Index build script and download indexes.
Move code from the character-encoder library.