This fixes a potential race condition in the CCheckQueueControl constructor, which was looking directly at data in CCheckQueue without acquiring its lock.
Even though only one CCheckQueueControl exists at a time, one of the CCheckQueue threads may have completed work but not yet updated nIdle or released its lock, so looking at that variable without acquiring the lock first is not safe.
Fixes #5703.