Even as Donald J. Trump trounced him from New Hampshire to Florida to Arizona, Senator Cruz could reassure himself with one crucial advantage: He was beating Trump in the obscure, internecine delegate fights that could end up deciding the Republican nomination for president. This is how elections are won in America, Cruz gloated after walking away with the most delegates in Wyoming.