Two former nuns and a retired support worker have been sentenced for abusing vulnerable youngsters at children's homes in Scotland more than 40 years ago.