Add real indexing and rewrite ERIC importers to use it

This commit also refactors the eric.js importer to use a stream rather
than reading the entire file into memory at once.