fix bugs in Unify.hs, store unifiers in fully-resolved form