T9-style autocomplete using a prefix tree