Added an example to the state.event runner for non-trivial sh usage
Switch state.event runner default to listen forever

This is the more common use-case. Updated examples accordingly.
Added pretty option to state.event for pretty-printing the JSON
Merge pull request #14710 from whiteinge/state-event-tweaks

A few updates to the state.event runner