On the heels of Jimmy Carter’s death, the organization he founded faced funding cuts and a future without his guidance. Here’s how it navigated the risks.