gjs-tests: Remove dumpstack test

OK, I lied. This is the most useless test ever.
Don't use JS_SetGlobalObject/GetGlobalObject

These are deprecated (and removed!) upstream, as they're just an
opaque pointer. JS_GetGlobalForScopeChain is what we want here, as
that looks up the global on the current compartment.