Timeout Django sessions

Fixes #2000

Summary of changes:
* Adds middleware to check last active time.
* Adds listener to logout event to end UserLog logging.
* Adds default 20 minute setting for session timeout.

@aronasorman and @dylanjbarth, please take a look.