Support library(quickcheck)
Add a few quickcheck tests

Some of the "or" properties should really be "xor".  However, even these
properties capture a good chunk of the behavior I care about.  I can
clarify to xor later.