Replace one-shot uses of QSemaphore with QLatch
This commit replaces one-shot synchronization of threads that were using
QSemaphore with QLatch. QSemaphore is efficient on Linux and Windows,
but allocates memory elsewhere. Even on those platforms where we have
futex-like OS support, QSemaphore is heavier than what we really need
here.
qt3d has a lot of uses of QSemaphore in non-single-shot mode, which
can't be replaced with QLatch. There are some possible improvements to
be had over QSemaphore for those, something for a later day.
Change-Id: Ib5ce7a497e034ebabb2cfffd1761a4fcb2be9a6c
Reviewed-by: Mike Krus <mike.krus@kdab.com>