The president has long treated tariffs as something he can impose or rescind at will. On Friday, six justices put an end to that.