test_runner: run before hook immediately if test started
Fixes https://github.com/nodejs/node/issues/51371
instead of the previous fix not running hooks when no tests, this makes sure before and after hooks run regardless of the existence of subtests