Senate nears a vote on gays in the military