Run each test in a new session and use subtransactions

This allows the tests to commit() the session properly but still rollback
all the changes at the end of each test to make sure that tests do
not affect each other but are also fast.