Fix compatibility issues with Django 1.6.

Django 1.6 replaced Model._meta.module_name with Model._meta.model_name.
The old attribute is readable via a property, but can no longer be
written to.

The only code that cared was our test model registration code. There's
now wrapper functions for reading and setting this, and will set the new
variable if it exists.