A federal appeals court struck down tariffs that President Trump had imposed by invoking a decades-old law.