Bug 991742 part 1.  Enter the compartment of the current wrapper before we try to reparent objects.  r=bholley

This lets us preserve some invariants about our current compartment matching the scope we want to wrap into.
Bug 991742 part 2.  Remove the "scope" argument of WrapNativeParentHelper/WrapNativeParentFallback/WrapNativeISupportsParent.  r=bholley
Bug 991742 part 3.  Remove the "scope" argument of WrapNativeParent().  r=bholley
Bug 991742 part 4.  Remove the "scope" argument of WrapCallThisObject().  r=bholley
Bug 991742 part 5.  Remove use of the "aScope" argument in binding Wrap() methods.  r=bholley
Bug 991742 part 6.  Remove the "aScope" argument of binding Wrap() methods.  r=bholley

This patch was mostly generated with this command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e 's/Binding::Wrap(aCx, aScope, this/Binding::Wrap(aCx, this/' -e 's/Binding_workers::Wrap(aCx, aScope, this/Binding_workers::Wrap(aCx, this/' -e 's/Binding::Wrap(cx, scope, this/Binding::Wrap(cx, this/' -i ""

plus a few manual fixes to dom/bindings/Codegen.py, js/xpconnect/src/event_impl_gen.py, and a few C++ files that were not caught in the search-and-replace above.
Bug 991742 part 7.  Remove the "aScope" argument of WrapNode() methods.  r=bholley

This patch was generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapNode(JSContext/ {; N; s/\(WrapNode(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and an additional manual change to nsINode.cpp.
Bug 991742 part 8.  Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods.  r=bholley

This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
Bug 991742 part 9.  Remove the "scope" argument of WrapNewBindingObject.  r=bholley
Bug 991742 part 10.  Remove the "aScope" argument from the Promise ArgumentToJSValue() methods.  r=bholley