Fix tests that would be slowed by transaction leakage.

There are still about 18 tests that leak transactions, but those do so in a way
that it will not cause slow downs, I think.