Align [starts|ends]With with the ES6 spec (+optimization refactor)

This will both be faster, and align these functions with the ES6 spec for some edge cases.

The `slice` change is simply an optimization refactor