The Senate dealt a double setback to gay-rights activists Tuesday, voting to reject same-sex marriage in federal law and killing a separate bill that would have barred job discrimination against gays.