Donald Trump has stormed out of the Supreme Court as one of his keystone policies came under the scrutiny of a sceptical bench.