Use grunt-contrib-watch.
Add unit tests mostly copied from lunr.js.