CTest: set number of threads used by each unit test
Also make sure regression tests are not run in parallel with anything else, because they might use a lot of cores and that's not directly controlled.
Needed for proper resource usage control when using parallel CTest.
Note that, due to #4654 (closed), we do not enable test parallelism yet.
Edited by Andrey Alekseenko