At the risk of sounding as if I'm on a pedestal: Giving guns to the police won't prevent, or even deter crime. Well maybe casual hooliganism, but not the kind of stuff that a guy might need a gun for.
The greatest effect of arming the police force would be escalating the conflict. We give the police pistols, the criminals smuggle in AKs, we then have to upgrade our weaponization, so we give them SA80s and so on and so forth. It's a war, fought on a small scale, and it won't be won on battleground, it probably won't be won, except morally, through due process. We can't sink to their level.
Aside from that, people treat guns so casually these days, killing anything for any reason is a brutal thing to do, (that said, I do love beef...) and as soon as a police officer becomes hardened to pulling a trigger, the more frequently he or she will do it. Then well, more riots.
I read your edits about using guns on rioters and I agree that that would be an excellent compromise, but in the mop of a riot, to stop looters etc, well what's to stop a police officer and his 9mm?