Big refactoring.

* Move indexer into a separate package.
* Add tests.
* In JSON output, shorten "title" to "t", "url" to "u".
* Adjust search.js to read new JSON format.