Introduce SingleThreadTaskExecutor the replacement for base::MessageLoop

A large but mostly trivial patch in preparation for removing
base::MessageLoop. We introduce SingleThreadTaskExecutor a simple FIFO
scheduler, which is intended for non-test code that needs a simple
single threaded task environment. Tests should use ScopedTaskEnvironment
or TestBrowserThreadBundle instead.

This patch also moves MessageLoop::Type to MessagePump::Type and
moves the factory method to MessagePump::Create.

TBR=gab@chromium.org

Change-Id: I9850c4657bb90b62490f4313c420cae025101371
BUG: 891670
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632216
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Alex Clarke <alexclarke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#664709}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 636e705be41ed9e7f50cdb13ceb5a9af5e3f4e5c
2 files changed