A bill that would have greatly relaxed the punishment for getting or performing an abortion in Ireland has been rejected.