A generic, safe mechanism by which DOM objects can be pinned and transferred
between threads (or intra-thread for asynchronous events). Akin to Geckoโs
nsMainThreadPtrHandle, this uses thread-safe reference counting and ensures
that the actual SpiderMonkey GC integration occurs on the script thread via
weak refcounts. Ownership of a Trusted<T> object means the DOM object of
type T to which it points remains alive. Any other behaviour is undefined.
To guarantee the lifetime of a DOM object when performing asynchronous operations,
obtain a Trusted<T> from that object and pass it along with each operation.
A usable pointer to the original DOM object can be obtained on the script thread
from a Trusted<T> via the root method.