Refactor StringImpl::{start,end}sWith(StringImpl*, ...)

In preparation for ASCII case-insensitive matching in these two methods,
add a macro for handling the "dispatch" to the right method, and split
the single method into two in both instances. Make the argument to the
new methods as well as the methods themselves const.
Add equalSubstring{,IgnoringCase} helpers and use those to implement
both of the methods.

BUG=565878

Review URL: https://codereview.chromium.org/1511813004

Cr-Commit-Position: refs/heads/master@{#364243}
3 files changed