regtest: Limit the number of worker threads to the number of documents to test
regtest: Limit the number of worker threads to the number of documents to test

We are always spawning all the threads even if the documents to test is
less than the worker threads. Also optimize the case of running only one
test to not spwn any thread.

GNOME/libgxps,GNOME/libgxps,GNOME/libgxps