The rulings amount to a stunning rebuke of the Trump administration’s efforts to target Trump’s political opponents.