Add a mixin for writing unit tests with custom models.

Django doesn't make it easy to write unit tests that have their own
custom models. The test runner has to add an app with a models.py file
to INSTALLED_APPS, and the models have to live somewhere within that
directory. This is a lot of work, and it's hard to keep things clean
this way.

This introduces a new mixin that can be used to allow a file containing
unit tests to define custom models. The classes that need to use the
models simply define the models within the file, use the mixin, and then
operate on them.

The mixin handles the hard work of sticking the module in
INSTALLED_APPS, loading the module, and also creating a fake 'models'
module to satisfy Django's requirements.

Reviewed at https://reviews.reviewboard.org/r/6245/