Fix the calculation of the total time on worker.

A task's time_execute_cmd_start is not guaranteed to be set to a correct value when a worker is cleaned up.

This introduces another task variable to keep track of when a task has been committed to a worker.  This time is checked when a worker is removed to avoid adding too much time to the total time on worker.