Don't duplicate session logic for each type of data store
Conform to Redis' behaviour in {InMemory,Shelve}Session

mget() returns None on non-existent elements, so use
dict.get(key, None). srem() doesn't fail on non-existent
elements, so use try: set.remove(key) except KeyError: pass.
Use context managers to properly access shelve data store
Make _inmem_{data,sets} class members of InMemorySession
Merge pull request #465 from mattpap/fix-server-sessions

Fix server sessions (InMemorySession and ShelveSession)