Refactor InspectorCSSAgent to avoid intermediate GlyphBuffers

InspectorCSSAgent::collectPlatformFontsForLayoutObject() builds a temporary
GlyphBuffer, and then iterates over all glyphs to collect SimpleFontData family
names.

A more efficient approach is to skip the GlyphBuffer and only iterate over the
ShapeResultBuffer runs (as all glyphs in a run share the same font data).

Add a helper method to CachingWordShaper and ShapeResultBuffer (runFontData)
to collect <runFontData, runGlyphCount> tuples, and refactor
collectPlatformFontsForLayoutObject() to use it instead.

Also refactor CachingWordShaper:

  * instead of passing a Font arg to all methods, pass it to the ctor
  * in practice we always use the Font's shape cache, so derive it internally
    instead of explicit ctor arg (but keep the explicit shape cache ctor flavor
    for tests)
  * the fallbackFonts param is only ever used for width(), so we can drop it
    from fillGlyphBuffer() and shapeResultsForRun()

BUG=574136

Review-Url: https://codereview.chromium.org/2718043003
Cr-Commit-Position: refs/heads/master@{#453581}
8 files changed