A hearing in the case of five migrants deported to Ghana last week showed how earlier Supreme Court rulings have paved the way for President Trump’s mass deportation campaign.