[qtcontacts-sqlite] Migrate existing databases to updated schema

Includes renaming the TpMetadata table to the correct name.