The defeat infuriated those protesting the country’s increasingly expensive housing market and underscored the difficulties his minority coalition government faces in passing legislation