Adds function to clear out the HTML div containing object details
in the editor, when the editor is closed, so as to minimize impact
on performance.

References #2731.