Add a GC option to FinalizationRegistry registry for WASM/foreign use cases

GC can’t do anything if it’s not aware of the nature of the reference … if it’s something held elsewhere it wouldn’t care or treat that reference any differently … this is the whole issue in a nutshell and while engines “prefer” not to encourage, everyone on the server exposes GC for this or that reason and every devtool allows GC passes so this is looks more like patronizing than a reason to not let developers hint GCs what should be tracked more greedly or ask GC to be invoked because there are extremely valid reasons to do so that current status-quo cannot explicitly or implicitly address.

Because clicking “Collect garbage” on devtools never broke a website neither, I am a bit skeptical of these reasons … we can tell the story “GC blocks”, “GC invoked is bad for performance” or “don’t GC because” … but there are tons of harakiri like APIs on the JS / Web ecosystem that ruling this one out when it’s actually needed because projects beyond “regular constraints” need it, feels just an unnecessary limitation to me, our project, everyone using WASM to do anything, others doing crazy reflected FFI stuff, workers using foreign PLs, and so on (a bit like eval … it’s bad, really bad, but there are inevitable use cases where it’s the only answer, see WASM evaluating thing internally, as example).

I hope this will be re-considered, discussed, and finally resolved because other PLs have GC abilities, it just happens the most used PL on this world can’t help less obvious use cases at all :cry: