Trump, a businessman and reality television star whose candidacy was widely treated as a joke 17 months ago, managed to stay in contention despite an unceasing series of revelations that would have sunk a conventional politician.