One more attempt to resolve the race conditions during abnormal termination

Ensure that no matter which fires first (iof complete or waitpid), we always go thru the state machine to properly record the number of terminated procs.

@ggouaillardet please give this a try