Donald Trump has criticised the UK and Spain for refusing full support for US strikes on Iran, threatening to cut off trade with Madrid and accusing London of delaying access to military bases.