The U.S. Agency for International Development was a key player in renewable energy and disaster protection around the world — until Elon Musk showed up.