BZ-1163965 - Multiple RuntimeEngines not getting disposed / JBPM-4439 - Multiple RuntimeEngines not getting disposed

(cherry picked from commit 284a8018072000d8cfae40348dd6778241aeaf19)