Bug 812417: Listen for domwindowclosed instead of unload when closing a
toplevel window.
Merge pull request #944 from ochameau/bug812417

Bug 812417: Listen for domwindowclosed instead of unload when closing a toplevel window. r=@erikvold