First stab at JSON event tracer

Not yet thread safe (so it forces threading off).
Builds JSON on the fly, so overhead is certainly bad.
Plan to fix all of that, but this at least "works".

There is now one tracing flag: 'trace'.
- 'debugf' installs the SkDebugf tracer.
- 'atrace' installs the Android ATrace tracer.
- Any other value is interpreted as a filename, and
  produces a JSON file for chrome://tracing.

All three modes work in DM, nanobench, and Viewer.

Bug: skia:
Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364
Reviewed-on: https://skia-review.googlesource.com/24781
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 70b8cb5..975d560 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1030,8 +1030,12 @@
       "tools/sk_tool_utils.cpp",
       "tools/sk_tool_utils_font.cpp",
       "tools/timer/Timer.cpp",
+      "tools/trace/SkChromeTracingTracer.cpp",
+      "tools/trace/SkChromeTracingTracer.h",
       "tools/trace/SkDebugfTracer.cpp",
       "tools/trace/SkDebugfTracer.h",
+      "tools/trace/SkEventTracingPriv.cpp",
+      "tools/trace/SkEventTracingPriv.h",
     ]
     libs = []
     if (is_ios) {