Add threshold to trie. This indicates the prefix fraction of string to use while putting and getting characters in the trie.
Update test and uses of Trie to take into account threshold.