A member of Iran’s military stands near an Iranian flag in Tehran this month. American voters in the midterm elections clearly expressed displeasure with the Iran war, which has driven up prices and failed to yield the quick triumph that President Trump had promised at its outset.