Work in progress for #383. Added a new and working test suite
for testing session hooks.

Session hooks for Simple sessions are now tested. The framework is
already ready to make it use a YAML backend.