WASHINGTON — In one of the most stunning primary election upsets in congressional history, the House majority leader, Eric Cantor, was soundly defeated on Tuesday by a Tea Party-backed economics professor who had hammered him for being insufficiently conservative.