Refactored Production, AST, Parsable

Put Production (and related classes) as well as AST (and related classes) in
their own files. Also refactored the way Terminals and Words are done: now they
are subclasses of the new LexicalCategory trait.