Performance improvement of starts/endsWith

This is the fastest implementation of this two functions. It is similar to lodash's implementation.
http://jsperf.com/startswith-fast
http://jsperf.com/endswith-fast