Tests: Add option to easily run tests with and without threading.