Bug 862918 - Only pass aIsModalContentWindow if we're actually a content docshell. r=bz

Currently, the parent browser.xul docshell ends up getting created as an
nsGlobalModalWindow, because we pass nsIWebBrowserChrome::CHROME_OPENAS_CHROME
from nsWindowWatcher when creating the initial container window. The other
plausible thing to do here would be to add CHROME_OPENAS_CHROME to the call to
CreateTopLevelWindow in nsXULWindow::CreateNewContentWindow, since it's very
clear there that we're just creating the containing browser.xul docshell and not
creating the actual docshell of interest to the caller. But that seems more likely
to have unintended consequences, so we fix it here.
Bug 862918 - Only create nsGlobalModalWindow for the primary content shell. r=bz
Bug 862918 - Add a utility method on Cu to get the class name of an object. r=bz

instanceof is behaving sketchily on modal window, and I want this test to be robust.
Bug 862918 - Tests for showModalDialog. r=bz

These are pretty basic for now, but I'm going to be adding to them in the other bugs
where I munge this stuff.