Add tests for a51d618a fix of RT #122283

Add a new re debug mode for outputing stuff useful for testing.

In this case we count the number of times that we go through
study_chunk. With a51d618a we should do 5 times (or less) when
we traverse the test pattern. Without a51d618a we recurse 11
times. In the case of RT #122283 we would do gazilions of
recursions, so many I never let it run to finish.

    /
        (?(DEFINE)(?<foo>foo))
        (?(DEFINE)(?<bar>(?&foo)bar))
        (?(DEFINE)(?<baz>(?&bar)baz))
        (?(DEFINE)(?<bop>(?&baz)bop))
    /x

I say "or less" because you could argue that since these defines are
never called, we should not actually recurse at all, and should maybe
just compile this as a simple empty pattern.