The scripting engine's `ExecutePluginCall` by default frees its `JSValue` arguments.
When `HookEngine::Call` iterates over multiple subscribers, the first call would free
the argument, leaving subsequent subscribers with an invalid pointer (use-after-free).
This commit fixes the issue by duplicating the `JSValue` for each subscriber and
ensuring the original value is correctly managed based on the `keepArgsAlive` flag.
A new C++ headless test `ScriptingTests.cpp` is added to verify the fix and prevent
future regressions.