Sessionmaker rollback mock

Adding a sessionmaker mock to transparently make a nested transaction
and roll back the changes at the end.