Commit on teardown

A common pattern is to automatically commit the database session when a request is handled, provided no exception was raised.