[qtcontacts-sqlite] Improve aggregate search logic and improve benchmark

Determine maximum aggregate contact id prior to batch save, and avoid
attempting to aggregate multiple contacts from the same sync target.
This improves performance significantly as the database size grows.
Merge pull request #39 from chriadam/batchaggregate

[qtcontacts-sqlite] Improve aggregate search logic