JS: add a separate restart method for Device
JS: add a separate restart method for Device

It is necessary to have a separate method to restart the processing loop
instead of using startStep because it is possible for a restart to be
attempted while the endStep method is executed. In that case,
endStepHandle.isScheduled() is false, which allows the next loop to be
started prematurely.

Signed-off-by: Harry King <409587b9e6671aa0763646191d292852dc49a658@gmail.com>

jaamsim/jaamsim,jaamsim/jaamsim,jaamsim/jaamsim,jaamsim/jaamsim