bug 861270 - prefer to use precise scale factor from GetDefaultScale() rather than approximate factor based on appUnits per devpix. r=roc
Bug 860438 - Straightforward cases. r=gabor
Bug 860438 - Remove context stack craziness from nsWindowWatcher. r=gabor

This patch should not change any behavior.
Bug 860438 - Simplify JSContext handling {Cancel,Suspend,Resume}WorkersForWindow. r=gabor

The only functional difference here is the removal of a bug in which we were
constructing a dom::workers::AutoSafeJSContext around aCx, but then continuing
to pass aCx to the callee. If aCx were to be null, we'd end up with a mismatch
between the stack and the active cx. But it looks likes stuff depends on cx
being non-null anyway, so that probably never happened.
Bug 860438 - Convert workers to SafeAutoJSContext. r=gabor

The only functional difference here is that AutoSafeJSContext entered a request.
Really, we should always enter a request and a compartment at the same time. But
for now we just preserve the old behavior with a JSAutoRequest.
Bug 860438 - Remove plugin-specific cx pusher. r=bsmedberg

The old code does two little bits of special sauce that are worth mentioning:

1 - It calls OnWrapper{Created,Destroyed} to maintain the lifetime of the
    addref'd context stack pointer. But that whole thing is gone now.

2 - It calls ScriptEvaluated to potentially invoke termination functions in
    certain cases. nsCxPusher does this too, but with slightly different logic.
    In particular, nsCxPusher checks whether the given JSContext was already
    on the stack, whereas AutoCXPusher checked whether there was another cx on
    the stack above this one. As far as I can tell from my investigations of
    this stuff, this is all total voodoo, and I think it should probably be fine
    to just use an nsCxPusher here.

Also, termination functions are going away soon in bug 841312.
Bug 860438 - Remove custom AutoPusher in ipc XPCShellEnvironment. r=gabor

Some of this existing code is little wacky in that it calls Environment(mCx)
in a non-static method, which I would think would be equivalent to |this|.
But I don't know this code well enough to be sure of that, so I'm just going
to do the careful thing.
Bug 860438 - Use nsCxPusher in JSD. r=gabor
Bug 860438 - Add assertion back in. r=gabor