Guard against invalid glyph shaping results

HarfBuzz can fail to shape all glyphs and will return a shape result
shorter than the text length along with debug warnings:
[ERROR:HarfBuzzShaper.cpp(375)] HarfBuzz returned empty glyph buffer after shaping.
[ERROR:HarfBuzzShaper.cpp(672)] Shape result extraction failed.

This patch fixes an SVG crash on the U+180E Mongolian vowel separator
by ensuring CachingWordShaper::individualCharacterRanges returns a
vector as long as the text run length. A DCHECK and test have been added
to protect against this crash in the future.

BUG=613915

Review-Url: https://codereview.chromium.org/2020863002
Cr-Commit-Position: refs/heads/master@{#396668}
4 files changed