allow casting Typedef to another Typedef

Now when I tries to cast from `Typedef!(Foo)` to `Typedef!(const(Foo))` I get a `e2ir` error.
Moreover, when I have a `alias TD = Typedef(Foo)`, I can't cast `const(TD)` to `TD`.
This PR fixes this issue.
I need to get `TL` for using inside a  `cast`. If a symbol declared inside a template constrain, it is not accessible from the template body. (Maybe this is a bug, I don't know)