Django 1.7 and python 3.4 compatibility fixes

This was base on the work done by @brianmay:

- https://github.com/brianmay/django-guardian/blob/master/debian/patches/0009-Add-Django-1.7-migrations.patch
- https://github.com/brianmay/django-guardian/blob/master/debian/patches/0010-Add-MIDDLEWARE_CLASSES-setting.patch

This PR would resolve #255.