ts/Task: spawn StateMachine on ts Context
This MR addresses the section "Spawn the Task state machine on the target Context
" in this plan.
It also introduces a more flexible mechanism to await for state transitions completion.
From my observations using benchmark
with ts-udpsrc
, there is no significant changes on CPU usage, which is in line with the expectations.
See individual commits messages for details.