[libcontacts] Ensure we don't process retrieved contacts multiple times
[libcontacts] Use internal IDs for contact sequence management

The strings used in Qt5Contact contact IDs are very slow to compare.
Cache the sorted index of contacts

Otherwise all our ID-based lookups require a traversal.
Reduce conversions between contact ID types
Merge pull request #35 from matthewvogt/jb9408

Reduce effort in managing contact lists