mstask: Move trigger management to the ITask implementation.