Make test resilient to GC behaviour.

When using a spy to log all invocations on a checker to
verify that different execution modes run in the same way,
the calls to finalize() from the GC would be logged as well,
since these are not triggered in a predictable way, we
cannot reliably compare them, therefore we should filter
them out instead.