[qtcontacts-sqlite] Support the QContactType detail properly

Note that we do not yet support any other types besides TypeContact.
[qtcontacts-sqlite] Create the isDeactivated index in new databases

This index was omitted from the list of pre-created indexes.
Merge pull request #129 from matthewvogt/contact-type

[qtcontacts-sqlite] Support the QContactType detail properly
[qtcontacts-sqlite] Supply the target aggregate for incidental contact creation

When we create an incidental contact to store data for an existing
contact, the ID of the aggregate for the new contact is already
known.  Supply this information to the save function, so that we do
not need to perform a search for the appropriate aggregate.
Merge pull request #130 from matthewvogt/aggregate-select

[qtcontacts-sqlite] Supply the target aggregate for incidental contact creation
Remove tests specific to unrelated contact managers
Correct wrong function declarations
[qtcontacts-sqlite] Open non-privileged DB when specified

Privileged processes need to be able to open the non-privileged
database when required. Signals regarding database activity also need
to be handled seperately for the two databases.
Merge pull request #131 from matthewvogt/non-privileged

[qtcontacts-sqlite] Open non-privileged DB when specified
[qtcontacts-sqlite] Use less error-prone method of detecting privileges

This commit just attempts to mkpath on the privileged database
directory.  If it fails, it now assumes that it's nonprivileged.
This method is less error-prone than the existing method which
relies on Qt's FS permission support (which cannot be abstracted
perfectly across platforms, and so doesn't really work).
Merge pull request #133 from chriadam/privnext

[qtcontacts-sqlite] Use less error-prone method of detecting privileges
[qtcontacts-sqlite-extensions] Add unit tests for TwoWayContactSyncAdapter

This commit adds unit tests for TwoWayContactSyncAdapter to ensure
we don't regress functionality in the future.
It also fixes two bugs found in the sync enablers during testing:
 - local since timestamp could regress in some circumstances
 - remote modifications of locally deleted contacts could be
   handled incorrectly in some cases
Merge pull request #132 from chriadam/twcsatnext

[qtcontacts-sqlite-extensions] Add unit tests for TwoWayContactSyncAdapt...
[qtcontacts-sqlite-extensions] Improve detail delta semantics in TWCSA

This commit ensures that detail provenance is maintained when a remote
sync results in a detail modification.
Merge pull request #134 from chriadam/fixtwcsa

[qtcontacts-sqlite-extensions] Improve detail delta semantics in TWCSA
[qtcontacts-sqlite] Connect to the correct signals on privilege fallback

In the case where we are unable to open the privileged database,
connect to the signals emitted by the nonprivileged database that
we fall back to using.
[qtcontacts-sqlite] Provide export mode for synchronization export

Some of our data is to be restricted from general access; in order to
achieve this we will create an external copy of the database, and
export appropriately sanitized data to it. Applications that are not
authorized to access the sensitive data will use the export database
via the qtcontacts-sqlite manager.

Synchronization between the two databases will be performed using
a variant of the two-way sync adaptor interface.  The difference
between this variant and the standard mode is that the export database
will not be considered the owner of data that originates within it;
that data will become owned by the primary database once it has been
imported.  Data acquired from the export database will become property
of the local constituent in the primary database, and will not be
distinguishable from data entered directly to the primary database.
Correct indentation

Indentation was intentionally left wrong in the previous commit;
otherwise the resulting diff was completely unintelligible.
[qtcontacts-sqlite] Allow details to be marked non-exportable

Non-exportable details are excluded from the aggregates reported by
fetchSyncContacts for the export sync target.
[qtcontacts-sqlite] Aggregate timestamps should be composed from constituents

The timestamp of an aggregate contact should not be updated
independently, but instead composed from the values of timestamps
in its constituent contacts.