[libcontacts] Allow selection of best avatar

A contact may have multiple avatars.  This commit adds a function
which allows client to select the best avatar based on the metadata
associated with that avatar.
Merge pull request #34 from chriadam/fixavatars

[libcontacts] Allow selection of best avatar
Fix package config version
[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