Stable sort the stats so the output is consistent.

Using a map instead of a list means the output order for counters is no longer guaranteed; this sorts the keys alphabetically and produces stable output.
Merge pull request #2 from anachronistic/stable-sort-stats

Stable sort the stats