Ptree worker refactors
Ptree worker refactors

Store next_time locally in the main() function, and in the selftest, run
the main() function for longer than a single tick.

eugeneia/snabb,eugeneia/snabb,snabbco/snabb,dpino/snabb,dpino/snabb,eugeneia/snabbswitch,Igalia/snabbswitch,Igalia/snabb,snabbco/snabb,dpino/snabb,Igalia/snabb,dpino/snabbswitch,Igalia/snabbswitch,dpino/snabb,Igalia/snabb,eugeneia/snabb,snabbco/snabb,snabbco/snabb,snabbco/snabb,eugeneia/snabbswitch,eugeneia/snabbswitch,alexandergall/snabbswitch,eugeneia/snabb,dpino/snabb,snabbco/snabb,SnabbCo/snabbswitch,Igalia/snabb,dpino/snabbswitch,SnabbCo/snabbswitch,Igalia/snabb,eugeneia/snabbswitch,alexandergall/snabbswitch,eugeneia/snabb,snabbco/snabb,eugeneia/snabb,snabbco/snabb,dpino/snabbswitch,eugeneia/snabb,Igalia/snabbswitch,alexandergall/snabbswitch,dpino/snabb,SnabbCo/snabbswitch,SnabbCo/snabbswitch,dpino/snabb,Igalia/snabbswitch,alexandergall/snabbswitch,Igalia/snabb,alexandergall/snabbswitch,eugeneia/snabb,Igalia/snabb,dpino/snabbswitch,alexandergall/snabbswitch,alexandergall/snabbswitch,Igalia/snabbswitch,alexandergall/snabbswitch,Igalia/snabb