Ireland passes controversial law allowing abortions in medical emergencies