They're expensive, tricky to organise, and - as the Republicans are finding this week - can be strewn with difficulties. Why do the two main US parties hold conventions to select a candidate?