Remove window event listeners when plugin is destroyed