Update middleware.py

Changed from datetime objects to timestamps allowing the use of serializers.JSONSerializer for session serialization (as it the default serialization since Django 1.6.x).
Probably faster as well.
Merge pull request #4 from yourcoke/patch-1

Update middleware.py