Re #273, an improved implementation for Django 1.5 compatibility.

I tried using @crosbymichael's code in a Django 1.5 project with an actual custom User model, only to run into a bunch of errors, which are fixed here. I have also ran and passed all the tests (both userena and umessages), even after modifying the demo project to use a custom User model.

Note that this requires a similarly patched version of django-guardian, which I haven't finished tweaking yet. I'll drop a line as soon as I push those changes.