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
2 files changed