MDL-43886 Javascript: Remove dialouges from the DOM upon destroy