DosGlob: Don’t leak when caller’s op tree is freed
File::DosGlob keeps its own hash of arrays of file names. Each array
corresponds to one call site. When iteration finishes, it deletes
the array. But if iteration never finishes, and the op at the call
site is freed, the array remains. So eval "scalar<*>" will cause a
memory leak under the scope of ‘use File::DosGlob "glob"’.
We already have a mechanism for hooking the freeing of ops. So
File::DosGlob can use that.
This is similar to
11ddfebc6e which fixed up File::Glob, but that com-
mit mistakenly used a C static for storing the old hook, even though
PL_opfreehook is an interpreter variable, not a global. (The next
commit will fix that.)