[PM] Create public interface shim.

This introduces a few new static functions which will eventually become
the public interface of the PM. It also migrates all external clients to
use only these functions.

A subsequent CL will rename the existing PM to PMImpl, and introduce the
public interface officially.

This CL also cleans up a small shutdown race by making
g_performance_manager atomic.

BUG=910288

Change-Id: Icb8947183615f3ccf87574e11186b484e6f8f693
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706589
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681972}
11 files changed