Same-sex marriage passes historic hurdle as Labor moves to veto religious freedoms