JBIDE-18732 BrowserSim: Closing shells before engine switching in order to invoke close listeners in CordovaSim