Some refactoring of BrowserSim to allow code reuse from CordovaSim Eclipse plugins