A sharp downturn in the construction sector has dragged down other areas of Spain’s economy.