Enable generalized state machines

- async { } block can now generate a subclass of an existing trait
- future system can directly return the state machine instance
  from async, without spawning an actual future
- adds iterator-based async implementation with future system