fix(check): Don't leak `Type::Ident` outside of aliased types
fix(check): Don't leak `Type::Ident` outside of aliased types

This is a bit of a weird one. The fundamental idea behind this commit is to make any 'alias' type always know the type it has aliases so for instance, if `Option a` is encountered we always know what the representation (`| None | Some a`) is. Before this commit this was not always the case as `Option a` could be `App(Ident("Option"), Generic("a"))` and not `App(Alias("Option"), Generic("a"))`.

However, due to Rust's ownership semantics preventing cyclic reference we need to be a bit clever. Each group of `type ... and ... in` is combined into the same type (`AliasData`) since these groups are the only places which types can be mutually recursive. Then when the aliased type (`| None | Option a`) is requested by calling `fn typ` we walk through the type and replace any occurances of `Type::Ident` with the proper `Alias` variant. Some helper methods which do not do this replacement are also provided but the `typ` field itself has been hidden to discourage its use.

gluon-lang/gluon,gluon-lang/gluon,Marwes/embed_lang,Marwes/embed_lang