Fix recreateIds query not always returning the highest numeric ID

This query would sort by tracker:id and expect the highest result to
have the highest numeric event or group ID, which can be a false
assumption depending on insertion order. This could result in the
highest group ID being set incorrectly, and eventually adding events to
an incorrect group.

Unfortunately, since the actual numeric ID is contained in a URI, and it
appears impossible to get substrings within tracker sparql queries, the
best solution I can find is to query all events and sort the IDs in
code.
Add methods to delete groups from GroupObject and ContactGroup
Merge pull request #12 from special/recreateids

Fix recreateIds query not always returning the highest numeric ID
[libcommhistory-declarative] Add a method to create basic outgoing message events

This allows clients to create outgoing message events that will be
immediately saved and visible in the UI regardless of actual backend
state, because it may take some time before it's possible to actually
send the message.

The returned event ID can be sent in the telepathy message
x-commhistory-event-id header to prevent commhistory-daemon from
duplicating the event.

Currently, this only supports plaintext IM and SMS messages with a
single target.