1.6 Compat

This branch upgrades the codebase to be compatible with Django 1.6.

There are a large number of changes here, so look per-commit to see the specifics.
Not needed anymore I take it?