Refactor mtwt hygiene code

Moves mtwt hygiene code into its own mod, so that mtwt_resolve becomes
just resolve for example. In preparation for adding namespace support
into it. Also, it lives in its own commit so that reviewing is much
easier.
Add namespace support for rename operation

So that the let bindings and loop labels with same name won't clash.

Closes #12512.