The prime minister said president’s comments did not reflect British values, in what appeared to be a jibe ahead of the King’s visit to the US