Add support for lattices.

Since we started this project, Spire added support for boolean algebras,
heyting algebras, and lattices.

This commit adds type classes for these types.
(Also remember that you can't say `x == NaN` but have to either use `java.lang.Double.isNaN(x)` or `x.isNaN` to test for not-a-number-ness.)