Fixes the policy template generator to work predictably even with Python hash randomization turned on.

Unit tests that were using directly str() on dictionaries were failing in a flaky manner when hash
randomization is switched on because the order in which dictionary entries are printed is not stable
anymore. To fix this we always sort the dictionaries in alphabetic order in values to make this
behavior stable and predictable.

BUG=18
TEST=Run unit tests with python 2.7+ and the -R flag and verify that they are not flaky.

Review URL: https://codereview.chromium.org/14940026

git-svn-id: http://grit-i18n.googlecode.com/svn/trunk@121 7262f16d-afe8-6277-6482-052fa10e57b1