TracedValue: add dchecks that the scope is always correct.

Each time a value is being written into a TracedValue / TracedArray
/ TracedDictionary, DCHECK that it's an active one.

Active bit is tracked on each scope in the following way:
- When calling Write* for primitive types, active bit is passed back
  to the parent.
- When calling Write* for complex types, active bit is passed to the
  newly-created scope.
- When destroying the scope, active bit is passed back to the parent.

Also add a few death tests checking that the dchecks actually fail.

R=primiano@google.com,eseckler@google.com,skyostil@google.com

Change-Id: Iab5122a2317c2ea7ad646039ea6e40a6fe7195ba
diff --git a/Android.bp b/Android.bp
index 8c9f234..a8a334e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -8218,6 +8218,7 @@
     "src/tracing/debug_annotation.cc",
     "src/tracing/event_context.cc",
     "src/tracing/interceptor.cc",
+    "src/tracing/internal/checked_scope.cc",
     "src/tracing/internal/interceptor_trace_writer.cc",
     "src/tracing/internal/tracing_muxer_fake.cc",
     "src/tracing/internal/tracing_muxer_impl.cc",