If Trump had lost, Clinton’s administration would have been weakened by doubts about her victory’s legitimacy, just as her campaign was dogged by false charges that it had stolen the Democratic nomination.