[tests] Add correctness test for reading datetime from db
[performance] Faster date conversion
[performance] Add a benchmark for Qt::ISODate
[qtcontacts-sqlite] Refuse to look up invalid phone numbers

Commhistory events can have named senders instead of phone numbers,
don't try to look those up as empty strings because they will match
against all contacts that happen to have invalid phone numbers.

This has a side effect of fixing a bug in libcommhistory where
such numbers are never considered 'resolved'.
[twowaysync] Use a fixed encoding version for OOB data

The twowaysync adapter was storing serialized data using
QDataStream, but QDataStream's encoding can change in
incompatible ways and it defaults to the most recent
encoding version. This was causing crashes when an
adapter running with Qt 5.2 tried to load data serialized
with Qt 5.1, because the encoding of QDateTime changed.

Fix this by committing to the Qt 5.1 version, which was
the one in widespread use at the time of this commit.
(Also, we got lucky and existing Qt 5.2 data can be
safely loaded with the 5.1 version because we're only
using UTC timestamps. The timestamps will be decoded
wrong, but that will be corrected by the sync and it
won't crash).

It is probable that support for future versions of Qt
will make it necessary to update the encoding version.
This can be done by explicitly converting the encoded
data in the schema upgrade code in contactsdatabase.cpp.
[fix] Fix compilation on glibc 2.19/gcc 4.8
Merge pull request #181 from faenil/nemomerge_fixes

Fix compilation on glibc 2.19/gcc 4.8
basic tracing of sql queries

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>