[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 #61 from special/endtime

[libcommhistory] Always sort events by endTime instead of startTime