Add strong user-defined type aliases.

Introduces 'type' syntax for declaring user-defined types,
as well as 'to' and 'from' syntax for constructing and
deconstructing instances thereof. UDTs may wrap any type,
including polymorphic functions, and are representationally
identical to their underlying type.

Also fixes a bug where definitions without type signatures
were assumed to be pure.