notify before actual destroy

needed so that external js libs can properly remove
themselves from the DOM if needed (ckeditor in my case)