Prepare for PostTask returning a promise

This patch introduces a PostTaskExecutor which will be used by PostTask.

In addition to reduce binary bloat from PostTask and ThenOn/CatchOn
templates I've arranged for the AbstractPromise to be constructed out
of line. This required it was possible to construct the Executor in
the templates to be passed to a non-inlined function which creates
the AbstractPromise. The binary size savings seem quite significant,
the overhead of a new ThenOn template instantiation is more than halved.

AbstractPromise::Executor has been pulled out into it's own file for
clarity. Most of this patch is churn due to this change.

PromiseHolder has been moved to promise/helpers.h because we'll need to
use it in various tests when the task runners are refactored to use
scoped_refptr<AbstractPromise> instead of OnceClosure.

Bug: 906125
Change-Id: I7f5415c92e5d5ad83ccfc72877562e377a6759fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1687262
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675110}
23 files changed