Appeals court rejects the Trump administration's expansion of mandatory detention for immigrants