Senate advances same-sex marriage bill amid religious freedo