perf(limitTo): replace for loop with slice

By replacing ```for``` loop with a slice we get a microscopic (but still :) ) performance boost while additional ```limit``` makes sure that if limit is ```0``` or ```NaN``` the function will return empty array.