Fix bug in higher-ranked code that would sometimes leak skolemized
regions and/or cause incorrect results.
Cleanup type resolution to use type folding infrastructure and not
have such a silly over-engineered interface.