[contactsd] Process deletions before additions

A sync batch cannot include the same contact in both the deleted
set and either added or modified sets.  However, it is possible that
a contact could contain a detail, then be deleted, then a subsequent
creation/modification could include a detail that conflicts with the
first detail.  Therefore, we should process any deletions in the
batch prior to any other modifications, so that such cases do not
result in conflicts.
[contactsd] Handle mangled detail URIs correctly during export

Detail URIs in aggregate contacts are mangled to prevent accidental
clashes with unique values in constituent details. The mangled
forms include aggreagte ID values; since these vary between the
privileged and nonprivileged databases, the mangled forms must be
translated between their correct form for each database.
[contactsd] Add configuration variables for exporter

To enable debug output, set /org/nemomobile/contacts/export/debug to
a non-zero integer value.

To disabled export activity, set /org/nemomobile/contacts/export/disabled
to a non-zero integer value.
Merge pull request #65 from matthewvogt/exporter-fixes

Fixes to DB exporter logic