Cleanup and fix operational tests.

This commit makes several changes to the operation tests as follows:

- Ensure the database is closed between each operational mode test as
  otherwise  the database is locked when trying to reopening it which
  makes it unusable
- Make the insert tests error after a single failure since every test
  afterwards is guaranteed to fail as well
- Remove some of the logging statements which cluttered up the failed test
  prints making it harder to see why a given test failed
- Make a couple of the log messages more descriptive