Fix test issue where the `be` method causing false passes.

The `be` method was hiding what should have been legitimate test
failures. Change all instances of `be` to use `equals` instead. Also
using sinon.spy now instead of my little homebrew spy. Also rewrite some
tests and test data that was not designed with the constraint that
states which have substates must have an `init` property and transition
to one of the substates immediately.