Fixed error that can occur if document.get('expiration') returns None
Not sure how my session got into this state but this change allows for a graceful recovery instead of an exception.
A cleaner way would probably to add a default value to the get().
This was likely from setting permanent to False which from 0.7.0 should no longer affect the serverside expiry. Previously some backends were not setting an expiry for non-permanent sessions, which has obvious implications for storage. All now do in accordance with PERMANENT_SESSION_LIFETIME. Anyone who really wants a non expiring session can just set this to a huge value.
Also mongo backend now uses time-to-live based on the expiry field
No longer needed.