re-wrote unit test framework to use pseudo type indexed values

Lean on polymorphic equality when possible, but support an assertEq
that takes a general equality predicate as well.