JS: move the conditional wait API to EventManager directly

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: avoid an extra call to getCurrentProcess each time for execute an ProcessTarget

Pass the current Process down to executeTarget and change the assert method to take
this Process as an argument.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: allow direct access to the thread-local evt variable from EventManager

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: hide the direct access to the ThreadLocal eventManager

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: complete the interrupt API for conditional events

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: add a static entry point for startProcess

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: add static entry points for the kill/interrupt methods to avoid two calls to Process.current

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: add a StateEntity class to track a single state during a run

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: move Thresholds on top of the StateEntity class

This avoid duplicating the statistics code for what is essentially a state.

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>