Tests

This pull request fixes a set of panics (better input checking), adds a slew of new tests, and fixes a few bugs in Quorum that got introduced in the switch from messages to RPC. 

There are still a few errors, but Luke has agreed to fix what remains and get the demo back into a working state.