Run g.reset_dom() on unload to help browsers free up memory

Some browsers require this extra step to free up some of the memory used by the charts.