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

(cherry picked from commit f2775d61533b9ab11bba9dfb74ec505bfc1bedae)