I say let the middle east do unto the middle east as it sees fit. Bring our troops home, bolster our borders and defenses. Unfortunately I'm afraid we will have a permanent presence over there.
There's no winning. However, if you're the man in charge who orders a withdrawal and chaos ensues, you can get blamed for losing. It would take some guts for a president to consider the situation without giving a lot of weight to the domestic fallout here in the US. Iraq slips back into civil war and/or becomes a puppet state of Iran (more so than it is currently.) Afghanistan turns into a worse civil war and the place ends up divided between various unsavory factions. Media would have a field day. Not good stuff for people seeking reelection or legacy.