The UK parliament has voted to legalize same-sex marriage and extend abortion services in Northern Ireland, which currently has strict abortion laws.