Bug 1035133 - [TestAgent] Check that the TestAgent object is here and di...+shepherd

...splay an error message otherwise r=yurenju
The existing debug function was not appending any text; I changed it to make it work but instead I'm commenting the "window.onerror=debug" line so that we have the same behavior than before, but it's easier to enable if we need it. We can also simply delete this function instead, tell me if you'd rather do it.