Bug 969156 - Don't fire onNewGlobalObject until the end of nsGlobalWindow::SetNewDocument. r=bz