Scheduler::remove(): call termination hook after the list is destructed
Scheduler::remove(): call termination hook after the list is destructed

Thread's termination hook is executed when thread is no longer on any
list - after the terminatedList local variable goes out of scope.
CezaryGapinski/distortos,DISTORTEC/distortos,jasmin-j/distortos,CezaryGapinski/distortos,DISTORTEC/distortos,DISTORTEC/distortos,DISTORTEC/distortos,CezaryGapinski/distortos,CezaryGapinski/distortos,jasmin-j/distortos,jasmin-j/distortos,jasmin-j/distortos,CezaryGapinski/distortos,jasmin-j/distortos