The Supreme Court rejected the Bush administration’s argument that the Guantánamo Bay detainees had adequate protections under a 2005 law.