BUG/MEDIUM: tasks: don't type-pun state and tid in builds without threads
__task_set_state_and_tid() updates t->state and t->tid at once through
an uint64_t cast, which violates strict aliasing. With threads the
__atomic builtins keep the compiler conservative, but without them the
accesses are plain, and gcc -O2 legitimately keeps using a stale
t->state: the CAS always fails and _task_wakeup() spins forever on the
first request until the watchdog kills the process.
Without threads there is no concurrency to protect against, so just
compare and assign the two fields directly.
This is what commit
c5f41118c01db4babcf6919f5eae4ce308adcfef should have
been.