[performance] in queryContacts, only load wanted details

This commit adds a check on detailName to the query in queryContacts.
It means doing an extra string comparison in sqlite, but that's faster
than processing extra rows in QSqlResult.

The check is not done if the detailTypes hint is empty, because
in that case (nearly) all the rows will be loaded anyway.