[tracing] fix a data race in MemoryDumpManager
Fix a data race spotted by the TSan bot [1] and re-enable the
MemoryDumpManagerTest.RespectTaskRunnerAffinity test.
The race consisted in mistakenly looking into the
pmd_holder->num_pending_async_requests to determine whether the dump
should be finalized inline at the end of the current stack frame
or on the last thread hop.
In theory it is possible that the chain of posted threads is done
before hitting the num_pending_async_requests check.
[1] http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20TSan%20Tests/builds/5757
BUG=499983
Review URL: https://codereview.chromium.org/
1186053006
Cr-Commit-Position: refs/heads/master@{#334396}