JBIDE-18732 BrowserSim: Adding cleanUpOnClose functionality