[tests] Make finalizer-wait.cs less prone to pinning.