Use class instance variable for internal state

* This changes to have a state machine instance as class's instance
  variable.
* The problem would manifest when a stately machine was defined in one
  class, and then another stately state machine was defined in another
  class. Since a single global state was kept, the latter would
  overwrite the former.
* Fixes Issue #14.