Move thread local state OUT of thread object.

This requires the user to explicitly manage the storage duration/place of the thread local state, making a fine grained memory allocation simpler.
3 jobs from master in 1 minute 35 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #2674
build_cmake

00:29

 
  Test
passed #2675
run_tests

00:28

 
  Sanitizer
passed #2676
run_thread_sanitizer

00:37