JS: migrate from the global `window` to `globalThis`
As of mozjs68 (gjs-1.64) globalThis
is recommended over window
and
it makes more sense in this context anyways. Migrate the few instances
of window
we use and adjust the eslint configuration.
window
will continue to resolve to globalThis
, so this won't affect
extensions or other downstream users.