tracing: Make ConvertableToTraceFormat move-only

Summary. This CL:
 - Makes TraceEvent ownership a move-only scoped_ptr.
 - Makes ConvertableToTraceFormat (CTTF) itself move-only scoped_ptr.
 - Updates all the codebase that uses CTTF in TRACE_EVENT macros
   to use move-only semantics.

Background:
Historically ConvertableToTraceFormat (CTTF) was RefCounted. The main
reason seems to be supporting monitoring mode (now deprecated) where
tracing needed to copy TraceEvents without flushing the TraceLog.
Not what monitoring mode is gone, there is no reason why TraceEvent(s)
should not be move-only.
Unfortunately CTTF being RefCounted exposed that implementation detail
to its public interface. Fortunately, most of the codebase doesn't care
about the fact that CTTF is RefCounted.
The only exceptions are:
 1. Memory-infra heap profiler {StackFrame,TypeInfo}Deduplicator
 2. cc::Layer DebugInfo

1) Is addressed creating a proxy class which delegates the CTTF methods
   to the duplicators inside MDSessionState. Essentially it makes
   the CTTF metadata events shared co-owners of the MDSessionState.
2) After an offline chat with danakj@, it seems OK to make DebugInfo(s)
   moved scoped_ptr (as opposite as copied), moving the ownership to the
   active layer and keeping a raw ptr into the pending layer.

BUG=559117
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
TBR=thakis,jochen,tbarzic,mnaganov,skyostil

Review URL: https://codereview.chromium.org/1717283003

Cr-Original-Commit-Position: refs/heads/master@{#378263}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cb1afb351f2232e22b4be9bbbe7c0449decee471
1 file changed
tree: c568d25957f7406346912103b467f249ffe22aaa
  1. trace_event_common.h