Three nuns have been sentenced for a campaign of abuse towards children at homes across Scotland in the 1970s and 1980s.