Backwards compatible Django 1.5 Custom User model support
Add custom User model support to tests.py
Backward compatible functions to get the User model name and User model

Can be used both in case of Django <= 1.4 and >= 1.5
Fixed migrations to run from scratch on projects with a custom User model

Backward compatible. Will work for older versions as well.
Use the custom user model label instead of the user model class to define ForeignKey relationships

This solves some issues in Celery where there were Import errors - most
probably due to circular dependencies.