Trump win confounds critics who thought gaffes would do him in