Investors buying into claims against governments are winning huge payouts. Developing nations, and the environment, are losing big.