scratch/threads: split ThreadPool into header and source, added some tests in main