Fix test isolation failures in StoreMigratorIT

... by making sure test databases are properly shut down after each run.