move threading APIs to a new header
remove an unused class
extract the event template from thread_observable