Basic invariant support should be complete.

Nested transactions aren't yet supported.
Bugfixes. Invariants work!

Invariant functions can also indicate failure by returning False in addition to raising an exception. Invariants that return None are still considered to have succeeded.