Parliament set to pass historic bill legalising gay marriage