Economic prosperity, growing public discontent and a historic shift to the right. What brought eight years of Socialist rule in Spain to an end?