Extend a finite state machine with guards: a transition only fires if
its guard predicate returns true.
Config: { initial, transitions: { state: { event: { target, guard? } } } }.
Guards are expression strings like '(ctx) => ctx.canGo === true'. Compile
each via new Function('return (' + guard + ');')(). Initial context provided.
solve(config, events, context) returns the state after each event.
Sample tests