Move running task ptr from a separate TLS var to the core struct.