Fix awkward context handling and refactor match_range

Switching the match_* methods so they're always invoked on the Parser
object, where they belong (since they're invoked before any Parser
instance exists). This has nothing to do with how their inner closures
get invoked -- those still run on a parser instance, so they still
have access to vcache, etc.