Rework threads to not be template based.
This allows us to more easily handle them and makes their interface closer to std::thread.
Test
run_tests
^~~~~~~~~~~~
app/test_for_new/CMakeFiles/test_for_new.dir/build.make:62: recipe for target 'app/test_for_new/CMakeFiles/test_for_new.dir/main.cpp.o' failed
make[2]: *** [app/test_for_new/CMakeFiles/test_for_new.dir/main.cpp.o] Error 1
make[1]: *** [app/test_for_new/CMakeFiles/test_for_new.dir/all] Error 2
CMakeFiles/Makefile2:246: recipe for target 'app/test_for_new/CMakeFiles/test_for_new.dir/all' failed
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
./ci_scripts/run_tests.sh: line 9: ./bin/tests: No such file or directory
ERROR: Job failed: exit code 1