rustdoc: Get rid of `allPaths` global variable by merging it into `searchIndex`.
rustdoc: Omit duplicate paths in the search index.

Since the items roughly follow the lexical order, there are
many items with the same path value which can be easily compressed.
For the library and compiler docs, this commit decreases
the index size by 26% and 6% before and after gzip, respectively.