Minor code re-organization
First cut implementation of removing executors dynamically

This sets a timer on each executor every time it is launched or
has finished a task. The remove executor timer is then started
as soon as one of the idle executors is triggered. An idle
executor timer is cancelled when the executor starts running
a task again, and the remove executor timer is cancelled when
there are no more idle executors.

An important TODO is to deal with synchronization. I have
witnessed multiple remove executor timers being started due
to the lack of synchronization.