[445603] Make session saving more configurable

Delegate the actual saving to a new handler, which can be configured to
defer the saving on post-commit and to execute the save in an exclusive
transaction (if in post-commit).

Both behaviors are currently disabled, so that there should not be any
actual change in behavior for now.

Bug: 445603
Change-Id: I1594a42f7d491f0e3a577634e9e9ff8292b2681d
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr>