Fix screen position based queries in threaded rendering environment


QtQuick's threaded renderer doesn't seem to always pair up sync and
render (or more accurately, beforeSynchronizing and node's
preprocess calls). Sometimes sync comes without a followup render,
or there are two syncs in a row, even though the sync is using
direct connection. Both of these cases broke the old
logic for handling position based queries.

Changed the logic to actually ensure we have resolved the query
before emitting the relevant signal.

Task-number: QTRD-3358
Change-Id: Ica6c8c311f53a06311c21532aaabc18c28556655
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
commitf3a73782738c5868541086eadd5e5c7b4aaabc14
parenta350868f0e49b52b5bb35ba5e320a0d7dc3f698a
authorMiikka Heikkinen <miikka.heikkinen@digia.com>
committerMiikka Heikkinen <miikka.heikkinen@digia.com>
commit timeThu, 9 Oct 2014 10:09:31 +0300