Bug 1019191 part 1.  Remove the dead finishInitForWrappedGlobal method.  r=bholley
Bug 1019191 part 2.  Remove WebIDL quickstubs for EventTarget, since the only remaining xpconnect EventTargets with classinfo are globals, and we never call PostCreatePrototype on globals.  r=peterv
Bug 1019191 part 3.  Remove calls to the empty DOM_MarkInterfaces/DOM_ClearInterfaces/DOM_InitInterfaces functions and the functions themselves.  r=peterv
Bug 1019191 part 4.  Remove the now-dead xpc_qsThrowGetterSetterFailed and xpc_qsThrowBadSetterValue functions.  r=peterv
Bug 1019191 part 5.  Remove the one remaining quickstub we have and all quickstub codegen.  r=peterv
Bug 1019191 part 6.  Remove dead code for setting up quickstubs on a prototype from XPCQuickStubs.h/cpp.  r=peterv
Bug 1019191 part 7.  Remove various dead-code throwing functions.  r=peterv
Bug 1019191 part 8.  Stop using xpc_qsACString in XPConnect.  r=bholley
Bug 1019191 part 9.  Remove now-dead JS-to-C++ quickstub conversion functions.  r=peterv
Bug 1019191 part 10.  Stop using xpc_qsUnwrapArg directly in BindingUtils.  r=peterv
Bug 1019191 part 11.  Get rid of the now-unused xpc_qsUnwrapArg.  r=peterv
Bug 1019191 part 12.  Eliminate some unused UnwrapArg specializations.  r=peterv

The following command:

  grep -Ir "UnwrapArg<" $srcdir/* $objdir/dom/bindings/ | sed 's/^[^<]*<//' | sed 's/>.*//' | sort -u

(with $srcdir and $objdir replaced by the relevant paths) produces this list:

${type}
_clazz
_interface
imgINotificationObserver
imgIRequest
mozilla::dom::EventTarget
mozilla::dom::IndirectlyImplementedInterface
mozilla::dom::TestExternalInterface
nsGenericHTMLElement
nsIBrowserDOMWindow
nsIChannel
nsIDOMCSSRule
nsIDOMDataChannel
nsIDOMMozMmsMessage
nsIDOMMozSmsMessage
nsIDOMMozWakeLockListener
nsIDOMWindow
nsIDOMXPathNSResolver
nsIFile
nsIFrameRequestCallback
nsIInputStream
nsIInputStreamCallback
nsIJSID
nsIMenuBuilder
nsIObserver
nsIOutputStream
nsIPrincipal
nsISelectionListener
nsISupports
nsITreeView
nsIURI

The ${type} bit is part of codegen.  The _clazz and _interface bits are the
macros in js/xpconnect/src/nsDOMQS.h that are defining UnwrapArg methods.  The
nsGenericHTMLElement is only used in xpc_qsUnwrapArg_HTMLElement.

Inspection of the above list indicates that none of the classes used with
DEFINE_UNWRAP_CAST_HTML are in it, so all those specializations of UnwrapArg,
and the xpc_qsUnwrapArg_HTMLElement method they call, are dead code.

Moreover, almost all the specializations set up by DEFINE_UNWRAP_CAST are dead
code as well; the only exception is the one for mozilla::dom::EventTarget.  But
since we no longer use Web IDL quickstubs for EventTarget, that one is only
used in a few places for method arguments, and none of those should have our
one remaining webidl event target passed to them.  So it's safe to remove that
specialization as well.
Bug 1019191 part 13.  Remove the now-unused castNativeArgFromWrapper and castNativeFromWrapper functions.  r=peterv
Bug 1019191 part 14.  Remove the now-unused HasBitInInterfacesBitmap and all the interfaces bitmap machinery that ends up unused as a result.  r=peterv
Bug 1019191 part 15.  Remove now-dead DOMCI_DATA bits.  r=peterv
Bug 1019191 part 16.  Remove nsDOMQS.h.  r=peterv
Bug 1019191 part 17.  Make some of the remaining quickstub unwrap methods static.  r=peterv

Note that we know that we always call UnwrapArg with an object, so
xpc_qsUnwrapArgImpl knows v is always an object.
Bug 1019191 part 18.  Remove the unused tearoff bits in quickstub unwrapping.  r=peterv
Bug 1019191 part 19.  Change GlobalObject::GetAsSupports to not rely on UnwrapArg producing an nsISupports for non-reflectors.  r=peterv
Bug 1019191 part 20.  Replace the getWrapper/castNative stuff in XPCQuickStubs with what I believe is a single function call that's equivalent to it, since the tearoff bit was dead code anyway due to never resetting clasp.  r=peterv,bholley