GPII-442:  Added new event:  "onStateChange".

Added "onStateChange" event to notify of any change in a process'
state, and functions to tap into this event.  Also, simplified
hasStateChanged(), monitorStateChange() functions.