[commhistory-daemon] Fix TextChannelListener::getEventForToken behavior and add getEventById

getEventForToken was depending on the query being asynchronous, which
isn't true with modern libcommhistory. The code used for that was
hackish and inflexible outside of the two cases where getEventForToken
was used, so it's better to do them synchronously and properly.

Also added a getEventById function with similar behavior.
[commhistory-daemon] Update existing outgoing message events when accepted by Telepathy

Fixes message tokens and some IM error cases for outgoing messages with
a pre-existing commhistory event.
Merge pull request #18 from special/master

Update existing outgoing message events when reported as sent by telepathy