tst_qsqlthread: Replace sched_yield calls with QThread::yieldCurrentThread.

Makes the test behavior identical across all platforms.

Change-Id: I5e564598d8e61588af2b73f04b4ca7c9b899c02a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>