Bruising midterm election results have left the U.K. prime minister weaker than ever as he and his party figure out their next steps.