tests.test_tool: ignore "[\d+ refs]" in debug interpreters

test.support.strip_python_stderr requires Python >= 3.2
test.test_support.strip_python_stderr requires Python >= 2.6, << 3.0