[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.