Taoiseach Micheal Martin has apologised to the survivors of homes for unmarried mothers for the emotional abuse and social stigma they suffered.