[WIP] Improve type.Table. Validate types. Remove semantic checks from parser.

### Parse:
* Purge all semantic checks.
* Reuse `simple_expr` rules in patterns.

### Type:
* Rewrite of `Table`:
  * Don't create new `Type` objects; reuse AST nodes.
  * Store type info using only dictionaries; leverage `__eq__` and `__hash__` of the respective AST nodes. Use `smartdicts` for retrieval of keys.
  * Allow cross-referencing of user-defined types and constructors to ease type inference.
  * Split type processing into functions for readability.
  * Propagate errors via exceptions.
* Add type validation in separate class.
* Fix bad line info in error message.
* Beautify code.

### Tests:
* Add complete suite of unit tests for `type` module. Run tests with parser support.
* DRY using the new API.