Avoid un-necessary decode in startsWith/endsWith

As requested in #2503.

Perhaps it's overkill?
Arguably, any time you have a string, and you use it in an algorithm or range, the you are *always* comparing codepoints. Or at least, the result produced should be "as if" you are using codepoints. The only way to do code unit comparison is by opting out with representation.

Although to be honest, I wrote these unittest trying to find the most ambiguous code possible, and make sure I still got the "correct" result.