Use a stack with cached results for faster backspacing (fix #29)
Remove (now redundant) prefix- and letter- caches.