Add integration test for pre version 6 databases.
I also took the opportunity to bring the files in testcases/db/version6-transition up to date with the current reality.