One solution I recall hearing mentioned last week (sorry, I don't remember who suggested it), would be for the American troops to pull out of major areas like Baghdad, but not leave Iraq completely. Basically it would amount to US troops being stationed at their own bases to keep the threat of Iran at bay, but running the country and controlling the violence would be left to the Iraqi troops. I don't know if it would work, but it seems better to me than leaving our troops to be shot at and blown up in cities filled with people they can't trust.
Let's face it, at some point the Iraqis are either going to collectively pull themselves up and say "We want an end to violence and a free democracy" or they won't. There isn't a free nation on earth that was totally set that way by a foreign power. At some point people in every modern democracy grew tired of being ruled by a foreign power, or a despot, and made themselves free. Iraq will have to do the same at some point.