Add pthread support to threading abstraction.

3 jobs from master in 2 minutes 51 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #2644
build_cmake

00:56

 
  Test
passed #2645
run_tests

00:50

 
  Sanitizer
failed #2646
run_thread_sanitizer

01:04

 
[ 66%] Building CXX object test/CMakeFiles/tests.dir/main.cpp.o
[ 77%] Building CXX object test/CMakeFiles/tests.dir/example_tests.cpp.o
[ 88%] Building CXX object test/CMakeFiles/tests.dir/thread_tests.cpp.o
[100%] Linking CXX executable ../bin/tests
[100%] Built target tests
===============================================================================
All tests passed (5 assertions in 4 test cases)

ERROR: Job failed: exit code 1