UI: Initial clean up and improvements

See preview @ https://primiano-dot-perfetto-ui.appspot.com

Major changes:
 - Make both the OverviewTimeline and the TimeAxis a pure
   canvas-based panel. This removes the need of a full mithril
   redraw when panning horizontally.
 - Ensure that no mithirl redraws happen when panning horizontally,
   and only canvases are redrawn.
 - Make the effects of selections on the overview timeline be
   visible in real-time on the tracks.
 - Make the zoom logic simpler. Following the mouse pointer
   when zooming is too confusing, especially when using the ADWS
   navigation, where the position of the pointer is irrelevant.

Minor changes:
- Switch all time units to seconds and introduce TimeSpan
  for ranges.
- Compute properly trace duration for both chrome and android
  traces.
- Add a notion of total trace time to the state,
  computed by the controller when loading the trace.
- Move the query for the overview timeline to the controller,
  make it work for both chrome and android traces.
- Centralize all animation frames in the raf scheduler and make
  the Animation class be a client of that.
- Simplify PanAndZoomHandler and introduce acceleration factor for
  long presses.

TBR=hjd

Change-Id: I81bdde5734409c4017a53cc24de33c82db0551f0
diff --git a/ui/src/frontend/track.ts b/ui/src/frontend/track.ts
index 3cc59cb..447f775 100644
--- a/ui/src/frontend/track.ts
+++ b/ui/src/frontend/track.ts
@@ -41,7 +41,9 @@
   abstract consumeData(trackData: {}): void;
   constructor(protected trackState: TrackState) {}
   abstract renderCanvas(ctx: CanvasRenderingContext2D): void;
-  getHeight(): number { return 70; }
+  getHeight(): number {
+    return 70;
+  }
   onMouseMove(_position: {x: number, y: number}) {}
   onMouseOut() {}
 }