[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