Move `jl_task_t` to `julia_threads.h` (#57117)
This is a subset of PR #56477 . I hope that it will be easier to get
this merged first, as it just moves things around, afterwards we can
update #56477 and it will be considerably smaller, and will thus
hopefully break less often (and in less bad ways) over time. (I can
perform the required update of that PR, too).
See also PR #57116 which contains another independent part of that PR.