[runtime] Make WaitForPendingFinalizers () really wait for the finalizers added by a previous GC. Fixes #20503.