Updated the schema upgrade test. In the original test I forgot to set the
schema version or to mock out the schema version. This caused none of the
schema upgrade functions to run. Which means the test didn't really do
anything meaningful.

I also added a few more tests to check that Qt model objects behave as
expected.