Bug 852847 - Part 1: Disable browserElement_oop_KeyEvents.html. r=kk1ff

In fact this test was already disabled; the OOP version was the same as
the in-process version because the test explicitly disabled OOP tabs.
Bug 852847 - Part 2: Do things later in our browser-element tests, thus avoiding doing things before the browser-element machinery has loaded. r=kk1ff

Also set network.disable.ipc.security to true and leave it that way. This prevents security errors in the tests which happen when we pop the pref.
Bug 852847 - Part 3: Fix a child-process shutdown leak around nested event loops. r=smaug, a=tef+

This also fixes a non-shutdown leak which occurs if you remove an
<iframe mozbrowser> from the DOM while it's processing an alert().