The size and breadth of the Democratic wave were still coming into focus, but the party prevailed in states long thought to be out of reach.