This commit adds plumbing to support mapping the process tree to lua objects which in turn allows a new `mux-is-process-stateful` event to be defined by the user for finer control over closing prompt behavior. refs: #1412