Having confounded Republican elites in the primaries, Mr. Trump did the same to the Democrats in the general election, repeating the judo move of turning the weight of a complacent establishment against it.