initial implementation of states. Untested.
jshint
tests and fixes for states
tests for exit, bugs worked out
tests for repeating states, fixes to tests
updated readme for stateful events.