Sketch of how the speculative re-parsing works.

There is no need for feedback as in a lexer hack. Instead we can use
the fact that the token stream for a statement is to be interpreted
as a declaration iff it is valid to do so. This means we can use the
old style parse that leaves unresolved IDENTs and then check afterwards
if those were valid typenames. If not then fall back to the interpretation
as a statement - if this is not valid either then the parser should
reject the code.

The Type class needs to be split into two parts - one for the result of
the first pass that is still tied to ANTLR and has an unresolved layer
of indirection. The second will be tied into the SymbolTable objects as
a pure model (no ANTLR dependencies). The SymbolTables will act as
containers for this second type - a set of canonical types for each
scope.