Refactor the unification code and rejuvenate the unit test
infrastructure that has been accidentally left out of the build
for a rather long time (it was still using `@DVec`!)
auto merge of #15079 : nikomatsakis/rust/issue-5527-unify-refactor, r=pnkfelix

This is just a cleanup of the code. Doesn't really change anything deep about the way we operate. This is a prelude to implementing a good solution for one-way matching for #5527.

r? @pnkfelix (we were just crawling about this code, after all)