test: use isMainThread for test with workers
Debugging why test-http2-reset-flood and noticed it's using an environment variable to signal whether or not we're in the main thread. The worker threads module has a property for that already, so use it instead.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines