Tehran sees an opportunity to control the Middle East’s energy as it bets on outlasting Trump’s will—a risky gamble.