Fix DetachedInstanceRevision in tests

By moving all calls to `helpers.reset_db()` to the `teardown` methods of
the test classes instead of the `setup` ones.