Stack sampling profiler: add fire-and-forget interface
Adds a StartAndRunAsync function on the stack sampling profiler that permits
profiling to be performed with a single call, rather than having to allocate and
start a profiler object. This allows the profiler to be used to record execution
state in response to discrete events (e.g. on the WatchDogThread) without
forcing the caller to maintain profiler-related state during the profiling
execution.
To keep the interface simple this change updates the stack sampling profiler to
require a CompletedCallback and eliminates the default completed callback. This
has the additional benefits of moving the retention of completed stack profiles
from base to components/metrics, simplifying the base implementation, and moving
UMA-specific parameters out of the base interface.
BUG=464929
Review URL: https://codereview.chromium.org/
1252533005
Cr-Commit-Position: refs/heads/master@{#341367}