Use OrderedDict where available instead

I was just updating a project to Django 1.7, and the tests were spewing out deprecation warnings for using SortedDict. This patch uses OrderedDict from the standard collections module when you are on Python 2.7 or above, and falls back on the deprecated Django implementation when using Python 2.6 or lower.