Re-ported code from the end of process_token to calculate lex_state.
Restored last_state, passing it down to process_token.

[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 9140]
- Fixed RubyParserStuff#new_body to deal with nonsensical code better (begin-empty+else). (snatchev)
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 9141]