REORG: threads: move all_thread_mask() to thread.h

It was declared in global.h, forcing plenty of source files to include
it only for this while it's only based on definitions from thread.h.
2 files changed