Rework session handling to support old Python

Remove static methods from Session object in order to make it possible
to dump/pickle the object on older Python versions.
Rework PersistentStorage to support old Python

Remove static methods from PersistentStorage object in order to make it
possible to dump/pickle the object on older Python versions.