Republicans win a slim House majority, splitting control of Congress and complicating the agendas of both parties