tracing: Consumer host will write / wait to write trace buffer in background

Writing to consumer client data pipe in main thread can cause us to wait
for the pipe to be ready on main thread. The main thread need to run
other work like giving out SMBs to processes. It can also cause deadlock
if the consumer client is also waiting for SMB. So, move the writer to
background task runner.

BUG=953837

Change-Id: I5cad2c45af8b4c7f0a69372e1c2633896c7e518e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1573162
Commit-Queue: ssid <ssid@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652725}
8 files changed