Add tests

  - Move coroutine example into test.
  - Add more tests to state machine tests
  - Add stub for mcast tests, no tests yet
Extend statemachine macro

  - fail the state machine if there's no more input
  - Allow option test routine.
  - Allow list of hooks to be folded over before state transition