Bug 834732 - Get rid of footgun bool param for nsCxPusher and use an explicit enum. r=mrbkap

The goal here is to get rid of this crap entirely, and make nsCxPusher always
push. But that's a scary change, so we do it in chunks. This patch, in particular,
should have zero behavioral change. This means preserving some very wrong behavior.
For instance, currently SafeAutoJSContext never pushes a damn thing, because the
safe JSContext doesn't have an associated nsIScriptContext. We preserve this
behavior, and in fact convert various similarly-buggy consumers to
SafeAutoJSContext, so that we can hoist the behavioral change into a subsequent
patch.
Bug 834732 - Make SafeAutoJSContext actually push something. r=mrbkap

Currently it never does, because the SafeJSContext doesn't have an
nsIScriptContext behind it. :-(
Bug 834732 - Make nsDocShell::AddState push the JSContext if it grabs one, and remove push in nsStructuredCloneContainer. r=mrbkap

This gets rid of one of the last consumers of REQUIRE_SCRIPT_CONTEXT.
Bug 834732 - Move cx pushing into nsPluginProtoChainInstallRunner. r=mrbkap

This gets rid of the last use of REQUIRE_SCRIPT_CONTEXT. \o/
Bug 834732 - Remove PushBehavior. r=mrbkap

Now that we only have ALWAYS_PUSH and ASSERT_SCRIPT_CONTEXT, we have uniform
release-mode behavior everywhere. Remove the crap.
Bug 834732 - Make nsCxPusher.Push(JSContext*) infallible. r=mrbkap

We leave the nsIDOMEventTarget* versions fallible for now, but this makes the
common case a lot simpler. Note that this means that pushing a null JSContext,
a bug, is no longer handled at runtime. But I think we should just assert
against it, since there are already callers that don't check the return value.
Bug 834732 - Implement stricter cx handling in xpc_EvalInSandbox. r=mrbkap
Bug 834732 - Push a cx in nsWindowSH::NewResolve. r=mrbkap
Bug 834732 - Push a cx in nsPrincipal::SetDomain. r=mrbkap
Bug 834732 - Push a cx in AdoptNode. r=mrbkap
Bug 834732 - Improve pushing in nsJSEnvironment. r=mrbkap
Bug 834732 - Introduce AutoPushJSContext. r=mrbkap

It's annoying to add yet another RAII class, but we're solving a different
problem here. In particular, there are lots of callers that grab a cx off
of an nsIScriptContext and use it without pushing. Most of the time this
is ok, since that cx is also the active cx. But it's hard to tell when we
might potentially violate that invariant. What's more, we don't want to just
use an nsCxPusher, because that does expensive things even when the cx matches
the one on the top of the stack. Most of these consumers should just switch
to AutoJSContext, but doing such a change en masse is a pretty risky thing to
do. So let's introduce a class that gives us good performance in the common case
and correctness in the uncommon case.
Bug 834732 - Audit callers of GetNativeContext and use AutoPushJSContext where appropriate. r=mrbkap
Bug 834732 - Assert proper cx stack handling in WrapperFactory::Rewrap. r=mrbkap