adding sync option to action creation

This PR adds a `sync` option to `createAction`, which will make the action functor invoke `trigger` instead of `triggerAsync`.