[ThreadPool]: Support TaskSource with concurrency > 1 in ThreadPool.

This CL adapts ThreadGroup::GetWork() to spawn multiple workers with the same
TaskSource until the desired concurrency is reached.

In addition, ThreadGroupTest.PostAfterDestroy was replaced with
ThreadPoolImplTestAllTraitsExecutionModes.PostTaskAfterDestroy.
The original intention was to test that TaskRunners call
PooledTaskRunnerDelegate::Exists() and avoid crashing when
the ThreadPool is destroyed. A ThreadGroup doesn't implement
PooledTaskRunnerDelegate however and the test only rely
on task tracker being shutdown. The replacement fixes this
as a ThreadPool test.


Bug: 839091
Change-Id: I3af5789f1ec5c1b9bbed36686de4797af3cbee55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1582427
Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678704}
14 files changed