jsauthority: ensure to call JS_Init() and JS_ShutDown() exactly once
Before this commit, we were calling JS_Init() in polkit_backend_js_authority_class_init and never called JS_ShutDown. This is actually a misusage of SpiderMonkey API. Quote from a comment in js/Initialization.h (both mozjs-78 and mozjs-91):
It is currently not possible to initialize SpiderMonkey multiple times (that is, calling JS_Init/JSAPI methods/JS_ShutDown in that order, then doing so again).
This misusage does not cause severe issues with mozjs-78. However, when we eventually port jsauthority to use mozjs-91, bad thing will happen: see the test failure mentioned in #150.
This commit is tested with both mozjs-78 and mozjs-91, all tests pass with it.