Years of disruption, soaring costs and endless political rows - what's gone wrong with the Edinburgh trams project? And now the cuts are coming. David Miller investigates.