android histogram: ChromiumAndroidLinker.LoadLibraryStatus

Record sample-per-attempt enum histogram to allow following what kind of
retries are happening, all in one histogram. This allows knowing
separately:
* whether loading succeeded
* which process it happened in (browser/child)
* whether loading at fixed address was attempted
* whether it was a retry

Not recording the status for loading the crazylinker's library because we did
not change that code there recently.

One tiny awkwardness turned out to be necessary: buffering the samples
until the process type is known (moved to a separate class). I tried to
make the process type to be known earlier, at loading time, instead of
library initialization, but it turned out not to be possible because
webview zygote loads the library without knowing the process type, and
then later initializes the library with the newly arrived info
(presumably after forking).

Bug: 981599
Change-Id: If8fbb0ea6c51b3caaf2b7ad2b2303d3c5105a939
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713640
Commit-Queue: Egor Pasko <pasko@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682230}
6 files changed