Implement early basic sqlite database code

Includes basic creation of the database, porting of the models. It's
possible to add and list groups, events, and calls in a basic way.

Most of the database behavior is stubbed out, and many things are
disabled or broken.

QStandardPaths is used for the database location, or a hardcoded
equivalent on Qt4.
Remove tracker database and sparql query code
Remove QtSparql dependency
Fix build of tests
Add more SQLite database function implementations

Includes some API/ABI changes as a result of now-useless functionality.
Use a basic query builder for event/group properties
Improve CallModel filters API and add account filtering
[libcommhistory] Bump soversion to 1.6.0 due to API/ABI changes
Remove old grouped call query logic from CallModel

This is unnecessary and tracker specific. If further work is required to
make contact grouping in CallModel work later (which doesn't seem to be
the case currently), it won't be done like that.
Minor porting tweaks
Store to/cc/bcc in the headers field rather than separate fields

This matches previous behavior, and makes more sense than trying to
abstract all headers into separate properties (e.g. language).
Fix id of returned event from DatabaseIO::addEvent
Emit eventsCommitted signals after modifying an EventModel
Fix SingleEventModel query building to match test behavior
[libcommhistory] Remove static library build

Tests now use the shared library, and the static library is removed
entirely. To enable tests, CommHistory::Adaptor is now an exported
class, but shouldn't be normally used and shouldn't pose an ABI problem.
Fix ConversationModel sorting
Fix issues uncovered by ut_eventmodel
Fix behavior of group startTime and endTime

The startTime and endTime of a group are actually the startTime and
endTime of its last event (which is confusing, but regardless). Query
them directly rather than storing them with the group.

The "last event" in a group is actually the event with the most recent
startTime, falling back to descending ID order. Fix the groups query to
obey those rules.

Also fixed the last event ID for groups with no events. It should be -1.
Invoke MmsContentDeleter when an event is deleted

This is not done when groups are deleted, because the old implementation
was done badly. MMS content is currently non-existant anyway, and the
implementation will be revisited later.
Fix behavior of GroupManager addGroups and getGroups