Second round of fixes to CCheckQueueControl to fix the assertion errors.

My previous attempt to fix the issue was commit d8f7447983, which failed to
address the issue completely. This previous fix guarantees that there is only
one control thread.

However, it is possible for a worker thread to wakeup during execution of
CCheckQueueControl::CCheckQueueControl(). This may happen because the wakeup
order is undefined after notify_all() is called. It creates a tiny time window
where the worker thread has temporarily decremented nIdle, which causes an
assertion failure in CCheckQueueControl::CCheckQueueControl().

The fix is to simply acquire a lock on the mutex used inside CCheckQueue.