The justices on Wednesday considered whether the Trump administration had legally ended the Temporary Protected Status program for hundreds of thousands of Haitians and Syrians.