Bug 860085 - Use an AutoPushJSContext in XPCCallContext instead of doing it manually. r=gabor
Bug 860085 - Rename xpc::{Push,Pop}JSContext and make them assert against DOM JSContexts. r=gabor
Bug 860085 - Remove unused AutoPopJSContext. r=gabor
Bug 860085 - Make XPCJSContextStack manipulators private to enforce that we go through the RAII classes. r=gabor

With this change, we can be very, very sure that we never push an nsJSContext
without instantiating an AutoCxPusher on the stack.
Bug 860085 - Stop using XPConnect::ReleaseJSContext in nsJSEnvironment::DestroyJSContext. r=gabor,mccr8

We now have the invariant that any in-use cx must be pushed onto the JSContext
stack with one of our stack-scoped automatic nsCxPusher classes. These classes
hold a strong ref to the nsIScriptContext associated with the JSContext they
push (if any). This means that, if this cx is in use, we will always have at
least one strong reference to the nsJSContext coming from the stack, meaning
that neither the destructor nor the Unlink() implementation will be called.
So we don't need to do any deferred destruction of the cx anymore.
Bug 860085 - Remove nsIXPConnect::ReleaseJSContext. r=gabor
Bug 860085 - Remove XPCCallContext refcounting optimization. r=gabor

We only use XPCCallContext for reflector calls now, at which point an AddRef
is totally insignificant. Using an auto pointer here lets us clean up some
code, and makes the XPCCallContext destructor start to look pretty sane. :-)
Bug 887841 - Be very careful when deleting a session that may not exist, r=mdas