Re-implemented timeout for js execution in particular, but also removed process concerns from the abstract engine type.