[qtcontacts-sqlite] Fix storeSyncContacts data loss

This function would previously lose data if: it was invoked such that
it implied modifications to a contact as well as other modifications
to another contact, which would subsequently be retargeted to apply
to the first contact (due to sync-target redirection).  In this case,
the redirected changes would be lost if the direct modifications were
processed subsequently.  The processing order would depend on database
row order, and effectively be random.