The Labor Party conference in Sydney has voted to support gay marriage, with MPs to be given a conscience vote in Parliament.