refactor TruncIndex to use a trie & vendor deps Upstream-commit: cab7894808d5b43590ec230c2391108536c34108 Component: engine