[qtcontacts-sqlite] Alter schema for improved query speed

SQLite generates better query plans using a simplified schema, where
the specific detail tables can be joined to the primary Details table
using only their corresponding rowid columns.

This commit contains only the schema changes, a following commit
provides the script to migrate from old to new schema.
[qtcontact-sqlite] Migrate existing databases to updated schema

Includes renaming the TpMetadata table to the correct name.