Add UMAs for SharedBuffer::lock()/unlock()

If SharedBuffer is rarely lock()ed successfully after its unlock(), we can
remove SharedBuffer::unlock() without significant performance regressions.
To evaluate this assumption, this CL adds UMAs for SharedBuffer::lock() and
unlock() counts.

This CL also fixes ResourceType enum names in histograms.xml.
ResourceType enum is introduced in 2013 and left unmodified since then, but
it is now inconsistent with C++'s Resource::Type values.
Because ResourceType enum has been unused recently (it is referenced in
histograms.xml only from WebCore.ResourceFetcher.ResourceTypeUponCacheHit,
which doesn't have C++ counterpart nor UMA reports at least since 2016/01),
updating the ResourceType enum values in histograms.xml looks safe.

BUG=603791

Review-Url: https://codereview.chromium.org/2140513002
Cr-Commit-Position: refs/heads/master@{#405956}
3 files changed