The same-sex marriage movement appears likely to end a banner year with a string of stinging defeats.