[qtcontacts-sqlite] Improve expansion of detail existence tests

Producing a 'where exists' clause results in a better query plan than
a contact ID lookup into a subselect.

Also, add functions to lookup DetailInfo and FieldInfo tables to
remove explicit loops where avoidable.
Correct the query of QDate fields

Unlike QDateTime, QDate should be interpreted against local time.
Compare fields in string form if MatchFixedString is specified
Remove invalid restriction on syncTarget value

Even in non-aggregating mode, syncTarget is still a mutable property
of each contact.
Set C locale for testing

Now that locale-aware sorting is enabled, testing should take place
under a specific locale for consistent behavior.
Fix phone number filtering tests

The original tests disregarded the meaning of the plus character at the
initial position and filtered it out. This is not correct, as it
should instead prevent the number from matching other possible
expanded forms.
All contacts have a timestamp detail; correct test assumption
Skip tests that require support for Group contacts
Adjust test expectations to match configured data
No distinction between empty/NULL string fields

We provide no distsinction between empty string fields and NULL string
fields. Tests that order these values should not expect stable sort
results.
Unitialized QDateTime is now equivalent to the epoch date