Thread pools: fixed the waiting tasks accounting.
Thread pools: fixed the waiting tasks accounting.

Behave like POSIX semaphores.  If N worker threads are waiting for tasks,
at least that number of tasks should be allowed to be put into the queue.

firebase/nginx,firebase/nginx,firebase/nginx,firebase/nginx