Cleanup django compatibility code.
Add support for Django1.7 migrations.