Isn't the easiest solution to all of this is to just teach people to be respectful and cooperative with police? Use your manners and do what they say. Mouthing off, threatening, running away from, and attacking the police doesn't seem to end up well sometimes.
I guess the other way do to it is to install cameras everywhere, have better written laws, train our police more, punish our police when they snap... That way people can use their rights to be mouthy and uncooperative.