Replace Django hashcompat with hashlib

This fixes a DeprecationWarning in Django 1.5, which recommends
no longer using django.utils.hashcompat.