Theresa May has been forced to make a hasty U-turn over Donald Trump's ban on refugees from Muslim majority countries.