Same-sex marriage legislation clears Senate hurdle