Add simple test harness

fps_meter is getting complex enough that it'd benefit from some simple
tests.
Refactor of FPS monitoring to use timeline concepts

First, this adds a raf-based polyfill for the draw/commit events api that uses
a rAF loop to guess commit events.

Then, on top of this is added a FPSMonitor singleton, which listens to either
the polyfill or the real timeline. It collects the events and provides a global
listener for changes in FPS, as well as some basic helper APIs for
domain-specific use cases: requestFirstFramePromise, beginMonitoringFPS.

The FPSMeterElement just becomes UI that listens to the FPSMonitor.

In some says, FPSMonitor is sort of the real api we want people to use, at
least for benchmarks and end-user-monitoring.