A far-right party is poised to play a key role in deciding who controls Spain's government following what many see as the most contentious election in recent memory.