Rewrote type handling.

The new system does not require the [renv] component of
the translation environment.

Also added a test to check that recursive types should go
thru at least one record type.

A consequence of the new type system is that any code that
handles types needs to have access to the type environment as
type aliases can occur anywhere. Examples of this are
functions [base_type], [type_equal], [structured_type],
[array_var], [record_var], etc.
Cleanup.