Fix deadlock when running with QT3D_MAX_THREAD_COUNT=1


Also remove duplication and make QAspectJobManager::idealThreadCount
the centralized function to retrieve expect maximum number of threads.

Pick-to: 6.0 6.0.0
Change-Id: Iec8d65d368ac7825ef87e883a987551726603adc
Reviewed-by: Mike Krus <mike.krus@kdab.com>
commit9ef97eaee6a1e795f0e5c2af7df29148914fb1b3
parent7f1bcdb799ad689fc138f976eed7e12f1ce64386
authorPaul Lemire <paul.lemire@kdab.com>
committerPaul Lemire <paul.lemire@kdab.com>
commit timeTue, 1 Dec 2020 15:42:01 +0000