[libcommhistory] Implement fetchMore for ConversationModel

This re-enables StreamedAsync mode for ConversationModel (despite that
it's not truly asynchronous, but nothing is right now). The model will
be populated incrementally as it's needed by the view.

The SQL query is also rewritten after a lot of research. SQLite cannot
use the table indexes for sorting if the query contains an IN or OR
expression, but the UNION ALL of several queries which search that index
is naturally in the right order, so it's very fast. This reduces the
query time for 120k events from 3+ seconds to <1ms.

The sort column is changed to startTime to match the index, but that
will likely be changed for all event queries in a subsequent patch.
[libcommhistory] Always sort events by endTime instead of startTime

Previously, calls were always sorted by startTime, as were groups and
the last message shown for groups. Conversations, however, were sorted
by endTime. Unify everything to always sort by endTime, and change the
database index accordingly.

There are two existing cases where start and end times may differ for
events: calls (obviously) and incoming SMS. For incoming SMS, the
startTime is the sender's timestamp reporting when the message was sent,
and the endTime is the local timestamp when it was received. Because it
can take hours or days for messages to deliver, we need to sort by the
endTime for SMS messages, so that unseen messages are always at the
bottom as expected. We currently display the startTime in UI, which
seems appropriate even if it may not be the same as sort order in some
corner cases. For calls, the distinction should only come up for cases
like call waiting, but either order seems acceptable.
Merge pull request #60 from special/fetchmore

[libcommhistory] Implement fetchMore for ConversationModel
Merge pull request #61 from special/endtime

[libcommhistory] Always sort events by endTime instead of startTime
[libcommhistory] Optimize RecentContactsModel query

For a large database of calls and messages, this improves the query time
from about 2100ms to 60ms.
Merge pull request #64 from special/optimize-recentmodel

[libcommhistory] Optimize RecentContactsModel query
[commhistory-tool] Add import-json -relativeDate option

Specifying '-relativeDate 20131204' to import-json will offset
imported events so that events on December 4, 2013 will have today's
date, and all other dates will be adjusted accordingly. Times for
imported events are not modified, which can result in events a few hours
in the future on the current day.

This is intended to help when importing predefined content.
[commhistory-tool] Allow importing calls from JSON
Merge pull request #65 from special/tool-relativedate

[commhistory-tool] Add import-json -relativeDate option
Merge pull request #66 from special/tool-jsoncalls

[commhistory-tool] Allow importing calls from JSON
Merge pull request #62 from matthewvogt/presence-updates

[libcommhistory] Prevent warning from missing contact manager parameter
Update dependency versions
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