Fix intermittent failures in the LeakTracer on 5.18+, remove all workarounds
ARGH! In the end the issue turned out to be stupid-simple: when PadWalker is
called it always returns us a hashref. This hashref is traversed, with its
own address recorded as seen. Once processed, the hashref itself is GCed,
leaving a stale entry in $seen_refs.
Up until 5.18 this was not a problem, likely due to no address reuse. However
after 5.18 PadWalker is very happy to return different hashrefs under the same
address over and over again. The $seen_refs entry leads to a skip, and the
actual contents of the pad are never examined - we've seen this hash already.
ARGH!
The decisive change is the single line around PadWalker - everything else is
cleanup of workarounds for this problem.
(cherry pick of
1a77219a)