The now-former President Obama might or might not have done the right thing by commuting the sentence of Chelsea Manning; I haven't decided yet. But at least Manning was tried, convicted, and sentenced before Obama intervened. After sentencing, a pardon or commutation can be considered on its merits. That's the standard process available to everyone.
Of course, the government might still screw up the prosecution; it happened in the Daniel Ellsberg case. I mean a fair trial, not a sham.
Sometimes a whistle-blower performs a public service. That's a judgment of history best rendered a decade or two later. Even when he or she does, I don't believe that an immediate exemption from prosecution is a good idea. The difficulty is that some whistle-blowers don't have clear thinking or pure motivations. Their revelations turn out to have insignificant positive impact but significant negative impact. We don't hear as much in the press about those. The whistle-blower effectively substitutes his or her personal judgment, often self-aggrandized, for the judgment of the government. As a society we must be careful about letting that become commonplace. A whistle-blower must know that there are consequences without deluding oneself that the end justifies the means. It seldom does. When it does, the whistle-blower has a moral basis to violate the law knowingly. But don't expect not to be prosecuted. Make your moral case after being convicted, if you are.