Changes to tests.

Some changes in recent code has changed the behavior of some code,
specifically, random number changes, and hash code changes.  Some
tests erroneously have checks that depend on these specifics.

Not all such changes have been made.