HeadlessDevToolsClientImpl::DispatchEvent to post a task

DevTools expects events to be processed asynchronously and if handlers
respond synchronously things can break.  This patch works around that
by posting a task to run the event handler.

BUG=546953

Review-Url: https://codereview.chromium.org/2200663002
Cr-Commit-Position: refs/heads/master@{#408976}
3 files changed