Bug 961551, part 1 - Add root wrappers to the map in XPCWrappedJS ctor. r=bholley
Bug 961551, part 2 - Move addref out of XPCWrappedJS ctor. r=bholley

This paves the way for smart pointerization.
Bug 961551, part 3 - Hold a strong ref to the root that is the result of Find in XPCWJS::GNOU. r=bholley

This is trickier than it looks, because this change causes additional
refcount traffic on |root| in the case where FindOrFindInherited
succeeds. This is potentially bad because if a WJS has a refcount of 1,
and no weak references to it, then if it goes to a refcount of 2 then
back to 1 it will be deleted.  A WJS can get in this state if it
is a root with a refcount of 2, and has a weak reference, then
its refcount drops to 1, then later the weak reference goes away.

However, in this case, there can be no other WJS in the chain,
or the refcount would be greater than 1, so FindOrFindInherited
must end up returning |root|, so |wrapper == root|, and the
assignment to |wrapper| will make root go to a refcount of 3,
so the release of |root| on exit will only cause the refcount to
go to 2, so |root| won't be deleted.
Bug 961551, part 4 - Remove release_root from XPCWJS::GetNewOrUsed. r=bholley

GetNewOrUsed now always releases |root| when |root| is non-null, so
release_root can be eliminated.
Bug 961551, part 5 - Smart pointerize root. r=bholley
Bug 961551, part 6 - Smart pointerize wrapper. r=bholley
Bug 961551, part 7 - Smart pointerize rootClasp. r=bholley

Also, move the declaration of |clasp| down to where it is used.
Bug 961551, part 8 - Use the code at the end of XPCWJS::GetNewOrUsed to build a new root wrapper. r=bholley

The code at the end of nsXPCWrappedJS::GetNewOrUsed will now correctly
construct a root wrapper when |root == nullptr|, so we can consolidate
the two places that construct |wrapper|.
Bug 961551, part 9 - Split scope of |wrapper|, plus other cleanup. r=bholley
Bug 960775 - Retire JS_WARN_UNUSED_RESULT in favor of MOZ_WARN_UNUSED_RESULT. r=waldo