Massively enrich the matrix support

We also add an ApproxEq type class, to try to keep testing a bit
saner.