String::endsWith() and String::startsWith() performance

Motivated by @pdietz in [this discussion](https://github.com/xp-framework/xp-framework/pull/267#discussion_r3613149) I tested various implementations for these two methods, and have come up with a performance improvement.