Japan was unique and we dropped to bombs becuase it would save more lives to do it than it cost to nuke them. Also, we are still paying them for it. In Japan, the war was pretty much over, we won. The military wouldn't give up though, and the Emperor couldn't or he would lose face and possibly be overthrown by the military. The civilian leadership discussed it with the Emperor and they needed a way for him to keep face. The bomb did that. Lots of military officers killed themselves after the bomb.
Now, on to Iraq. Who didn't know there was extremists over there before we invaded, liberated, whatever politically correct turn is in vogue now? This was their (the extremists) excuse to do something they would gladly have done anyway.
Saying "nuke iraq" to stop terrorism is about as dumb as saying "nuke columbia" to stop the drug trade. Iraq is the front line today, but by no means the only country with extremists. The extremists don't like us, no ****. Who needed que cards for that one? Most of the people of Iraq like us there, and welcome us there, but the only thing making the news is the deaths of soldiers. The extremists don't want our ideas there because then they lose power. They control the population through their religion. If people started getting more individual ideals the clerics and extremists lose their power.
We have to show them we are not the devils we are made out to be. We have to show them we respect their heritage. Fighting a war is not just about fighting an enemy, but about getting the civilian population on your side. The prison abuse hurt that.
In regards to the difference between the prison and the beheading, think of it this way.
We hold ourselves to a higher standard than muslim extremists. When we do something wrong, we feel betrayed by those who performed the deed. When a muslim extremists does something wrong, he is crazy, so how could we expect less from such as that?
My suggestion? triple the number of soldiers in Iraq. Hunt down extremists like dogs, turn them over to the authorities, then watch the trials. Will some be freed, sure, but to garish our support, many will be put to death. Being hunted and killed by their own is much sweeter than being hunted and killed by the US. Of course, I am sure they would just blame it on a puppet government, but we aren't trying to change the mind of the extremists, but the general population.