Use a proper lexer in cursorcontext.go

Instead of loosely parsing strings, we are now parsing AST tokens
direclty. This should make the context detection much more robust, and
allow for easier extensions later on.
Rename bytes_iterator into token_iterator
Rewrite a couple switch blocks