[qtcontacts-sqlite] Include transient state when filtering or sorting on presence

When a contacts query requires that we filter on IsOnline status, or
sort by global presence state, include the data from the transient
detail store so the query can be performed correctly.

Note, there will be many cases where this is not enough; if we identify
further important use-cases that also require access to the transient
data we will need to add special case handling for those also.
Yes - 500 is just a number which works, I can't find the real number (actually, I'm pretty sure the number was around 800, when I last tested it.)  Practically, conservatism is fine here :-)