Reland of Android: Add support for TraceEvent before the native library is loaded. (patchset #1 id:1 of https://codereview.chromium.org/2145443002/ )

Reason for revert:
Reland.

Original issue's description:
> Revert of Android: Add support for TraceEvent before the native library is loaded. (patchset #12 id:220001 of https://codereview.chromium.org/1486053003/ )
>
> Reason for revert:
> https://crbug.com/627142
>
> Original issue's description:
> > Android: Add support for TraceEvent before the native library is loaded.
> >
> > Currently TraceEvents recorded before the native library load are
> > silently discarded. This CL adds support for such "early" events.
> >
> > The events are buffered in Java, and then sent to the native side once
> > it is available. This support is intentionally simple now. The aim is to
> > ease performance investigation of early startup, and to ease tracking of
> > early startup performance regression, since timings are then accessible
> > to TBM tests.
> >
> > Also use the newly-introduced events in a couple places, and fix a bug
> > in the TraceEvent we use to record the launcher activity lifetime (when
> > an Activity calls finish from onCreate(), onPause() is not called).
> >
> > BUG=564041
> >
> > Committed: https://crrev.com/fb0784294541c53f12e283124672750ab2e291f1
> > Cr-Commit-Position: refs/heads/master@{#404635}
>
> TBR=pasko@chromium.org,yfriedman@chromium.org,jam@chromium.org,lizeb@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=564041
>
> Committed: https://crrev.com/ffda73103b9a84e4739088175b9250a0c28e6f8c
> Cr-Commit-Position: refs/heads/master@{#404752}

BUG=564041
TBR=jam

Review-Url: https://codereview.chromium.org/2142803002
Cr-Commit-Position: refs/heads/master@{#405120}
10 files changed