Refactor `lunr.tokenizer` for speed
Refactor `lunr.tokenizer` for speed

1. Use `String.prototype.trim`
2. Change the regex so that filtering out empty matches is not necessary
3. Call `toLowerCase` once instead of repeatedly in `map`

Removing the calls to `map` and `filter` results in pretty big speed
improvements (2X-4X), and probably (haven't tested it) lower memory
usage.

http://jsperf.com/stringsplitting

janeisklar/lunr.js,panfany/lunr.js,olivernn/lunr.js,mientjan/lunr.js,shunshunedu/lunr.js,janeisklar/lunr.js,olivernn/lunr.js,janeisklar/lunr.js,olivernn/lunr.js,jjow/lunr.js,mientjan/lunr.js,shunshunedu/lunr.js,codepiano/lunr.js,jjow/lunr.js,seongjaelee/lunr.js,weo-edu/lunr.js,seongjaelee/lunr.js,mientjan/lunr.js,weo-edu/lunr.js,codepiano/lunr.js,panfany/lunr.js,lb-/lunr.js,weixsong/elasticlunr.js,jjow/lunr.js,Darkle/elasticlunr.js,lb-/lunr.js,lb-/lunr.js,panfany/lunr.js,weo-edu/lunr.js,shunshunedu/lunr.js,Darkle/elasticlunr.js,Darkle/elasticlunr.js,codepiano/lunr.js,weixsong/elasticlunr.js,seongjaelee/lunr.js