Django 1.7

Hello, I made ​​a some changes, now userena working more stable with Django 1.7

maybe I made too much changes:) but it's work fine in production
Duplicated definition from `userena/middleware.py`. Should be in one place: `userena.compat`