Children were abused at homes run by nuns, Scottish inquiry finds