Close #25373: Fix regrtest --slow with interrupted test

* Fix accumulate_result(): don't use time on interrupted and failed test
* Add unit test for interrupted test
* Add unit test on --slow with interrupted test, with and without
  multiprocessing
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index aa95b21..82788ad 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -7,10 +7,11 @@
 import sysconfig
 import tempfile
 import textwrap
+from test.libregrtest.cmdline import _parse_args
 from test.libregrtest.runtest import (
     findtests, runtest,
-    STDTESTS, NOTTESTS, PASSED, FAILED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED)
-from test.libregrtest.cmdline import _parse_args
+    STDTESTS, NOTTESTS, PASSED, FAILED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED,
+    INTERRUPTED, CHILD_ERROR)
 from test.libregrtest.setup import setup_tests
 from test import support
 try:
@@ -87,7 +88,8 @@
 
     def accumulate_result(self, test, result):
         ok, test_time = result
-        self.test_times.append((test_time, test))
+        if ok not in (CHILD_ERROR, INTERRUPTED):
+            self.test_times.append((test_time, test))
         if ok == PASSED:
             self.good.append(test)
         elif ok == FAILED:
@@ -291,10 +293,12 @@
             else:
                 try:
                     result = runtest(self.ns, test)
-                    self.accumulate_result(test, result)
                 except KeyboardInterrupt:
+                    self.accumulate_result(test, (INTERRUPTED, None))
                     self.interrupted = True
                     break
+                else:
+                    self.accumulate_result(test, result)
 
             if self.ns.findleaks:
                 gc.collect()