The 49-to-51 vote was a huge setback for the majority leader, Mitch McConnell of Kentucky, who has spent the last three months trying to devise a repeal bill that could win support from members of his caucus. The truncated Republican plan was far less than what Republicans once envisioned.