Destroy widget only when there are no more browser windows open; catch exception thrown by CustomizableUI.createWidget() that was causing code execution to halt