The Spanish Prime Minister called for early elections after his governing coalition was unable to pass a package of emergency housing measures.