The Thread class may need to be extended for certain ports or distrubutions; doing so in separate classes (and separate source files) makes the separation clearer and easier to manage. Add a separate class ThreadExt to support this. Also move find_thread_from_id() from Management to Thread and make some management functions visible outside the INCLUDE_MANAGEMENT #ifdef.