Cleanup blink::SegmentedString.

This CL cleans up and simplifies SegmentedString, leading
to an improvement in parsing performance.

This CL also adds a cache for the current_char_ in SegmentedSubstring,
so it can avoid a branch when calling GetCurrentChar().

Profiling shows a 1.5% improvement in the jQuery benchmark in
Speedometer 2.0 and around 1% across the various VanillaJS benchmarks
in Speedometer 2.0.

Change-Id: Idc1ae1e277aaec1c9f581075eab563fcd2a72688
Reviewed-on: https://chromium-review.googlesource.com/762016
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515989}
3 files changed