Lewis Hamilton demoted from pole to back of grid at Spanish Grand Prix