Add Action monad, supporting setState and asyncSetState.