Spain goes to the polls in contentious snap election