Implement hash protocol for Or/And operators

This has a lot of nice simplification benefits:
* -a * b == b * -a
* Xor(-a * b, b * -a) <=> 0
* Equal(-a * b, b * -a) <=> 1
* Or(-a * b, b * -a) <=> -a * b