improved retrieval of autocompletion token
add maximum depth to search trie in for optimization
avoid calculating trie twice (in cases where cursor change is detected by codemirror)
Merge branch 'optimizedCompletion' into dev