Merge pull request #63 from matthewvogt/presence-updates

Testing PR 62 in 'next'
Move contactHasAddress method to RecentContactsModelPrivate

This function is only used by RecentContactsModel, and uses an enum from
that class; it does not belong in EventModelPrivate.
Move more RecentContactsModel functionality out of EventModelPrivate
Remove duplicate implementation of EventModelPrivate::fillModel

Also fixed the return value in EventModelPrivate.
Don't use GroupsUpdatedFull for ConversationModel

This was used to update events with contact info from the
GroupsUpdatedFull signal; that is redundant to and less reliable than
the contact signals we'll get anyway when contact changes are enabled.
Remove unused EventModelPrivate::findParent
Remove non-existent CallModelPrivate::resolveContact function
Return false when EventModelPrivate::executeQuery fails
Merge pull request #67 from special/eventmodel-fixes

[libcommhistory] Cleanup for EventModelPrivate and related code
[libcommhistory] Fix GroupModelTest failure

The event sorting behavior was changed in 75d4ea3 to consistently sort
events by endTime (or received time), and this resulted in a change of
behavior for the last event of groups.
[libcommhistory] Use hide_symbols instead of manual cflags
[libcommhistory] Rename EventModel::enableContactChanges to setResolveContacts

The old function is kept for API compatibility, but the behavior may
subtly change in the future.
[libcommhistory] Add ContactResolver class

ContactResolver resolves contacts matching a list of events, and emits a
signal when all events have been resolved (successfully or not). It's
currently built on ContactListener, but could be made more efficient by
using SeasideCache directly later (e.g by handling results from the
cache instantly, and reducing address comparisons). It is intended to
eventually evolve into an API that can replace the bad ContactListener
API entirely.

ContactResolver maintains a cache of lookups to contact results,
intended to provide a fast path when resolving many events using the
same address (which may not exactly match any of a contact's addresses).
[libcommhistory] Use ContactResolver when filling EventModel

This does not yet alter the addToModel/update paths, only filling the
model by executing a query.
Set up contact listening on setResolveContacts

Before, this was inconsistently enabled after the query was executed, in
a very bug-prone way. It's cheap to enable on an empty model.
Remove contactCache from EventModelPrivate
Asynchronously resolve contacts for EventModelPrivate::addToModel

To preserve the current API (for now), a synchronous option is offered
that will insert the event immediately regardless of contact resolving,
and update asynchronously if necessary. This is used only by
EventModel::addEvents, and can be removed once that function is made
asynchronous.
Port RecentContactsModel to new event contact resolution
[libcommhistory] Forbid contact resolving when SyncQuery is enabled

Contact resolution is always asynchronous. It could be implemented to
fill the model synchronously and update contacts afterwards, but it
would be fragile and of little use. Synchronous models should be
discouraged as much as possible, anyway.
Don't emit modelReady until model is populated