Validate types in typedefs. Fix smartdict bug. Unify exception hierarchy in type module.

### Errata:
* Add entry about valid argument types in constructors.
* Sort all entries.

### Smartdict:
* Fix serious bug that caused `smartdict`s to share state.

### Type:
* Unify error hierarchy.
* Delegate type validation to `Table`, since it has to be state-aware.
* Validate arguments of constructors in typedefs. Allow complex types to be used as arguments. 
* Groom module.

### Type test:
* Drop `@staticmethod` decorator; it only clutters the tests.
* Adapt tests to new design of `type` module.
* Expand tests of type validation and typedef processing to match desired functionality.