Returns NULL in main context. Still not entirely safe to call on
non-main thread.
The slightly faster "unsafe" version is available as cotask_active_unsafe.
The new cotask_active is currently not used by anything; it's intended
for a logging system update later.