US Senator Ted Cruz, a leading former rival of Republican presidential nominee Donald Trump, was cheered and booed after he held back on offering Trump an endorsement during his speech at the Republican National Convention.