Use Qt unit testing framework's init() & cleanup().

These allow us to eliminate some setup and teardown in each
test because they are called before and after each test.

This also adds a cleanupTestCase() which cleans up the
temporary log file we create to test file based logging.