Fixed #22867 -- Memoized django.utils.version.get_git_changeset().

Restored original fix that had to be removed because the old djangoproject
server was still using Python 2.6.