refactor TruncIndex to use a trie & vendor deps

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Merge pull request #6657 from unclejack/refactor_truncindex

refactor TruncIndex to use a trie & vendor deps