Fix WeakRefs and FinalizationRegistry
Call the required embedding functions for WeakRefs and FinalizationRegistry to work, when we queue microtasks. Also call them in System.gc() in order to be able to test this deterministically.
Closes: #600 (closed)