Many fixes to py3 support and django 1.7 compatybility

Also adds pytest-django runner and fixes #327 and #318 .