QDeclarativePositionSource: fix start/stop/update logic


The logic of active state updates was broken.
For example, calling update() and then stop() was immediately switching
to inactive state, while the position source was still waiting for a
single position request to complete.
This patch fixes this and some other logic errors and adds several unit
tests to cover different scenarios of calling these methods.

Change-Id: I5cea19c711744a1b57dd0427a41119d789f4033b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
commitec1f9c6c5c10e4ee32a2ed1703c40b29a99018a0
parent1c48997d94b49a7cd0ce4f52ad65fe59e9ebdabd
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeWed, 28 Apr 2021 13:13:00 +0200