Set this.Window and this.Document to null on unload.

Fix for issue #2329

Tested in IE7, 8, 9 and 10, and the latest releases Firefox and Chrome.
Frees up large amounts of memory when navigating away from a page.
Set testElement to null on domready

The testElement used in DOMReady shows up in Chromes Heap Profiler as a
detatched dom tree entry. This probably cases a leak.

#2476
Incorporating changes by kguelzau

Comment thread: #2329
Pull request: #2476
Add missing null.

Pull: #2476
Spaces to tabs

Changes from @ibolmo

ref #2476
Merge PR-2476: Fix for IE8 iFrame leak

closes #2476, fixes #2329

* pr/2476:
  Spaces to tabs
  Add missing null.
  Incorporating changes by kguelzau
  Set testElement to null on domready
  Set this.Window and this.Document to null on unload.