Fix heap-use-after-free in tst_QStateMachine::signalTransitionSenderInDifferentThread2
The test moves the state machine, and so all its states, to a new
thread, and then tries to access the QState::active bindable property
after the thread is finished. It looks like the binding storage is
already destroyed at that point, and so this results in use-after-free.
Fix the issue by only checking the signals that are detected by
QSignalSpy. Do not access the state's active state directly.
Pick-to: 6.8 6.5
Change-Id: I5bde2b278ed0366cc7c9c013707647b50112c56f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>