How Ted Cruz went from candidate to cautionary tale