Fixed a bug relating to lingering executors [2/2].
Fixed a bug relating to lingering executors [2/2].

A task-less v1 executor could linger if the agent restarts
before any of the executor's initial tasks got delivered.
This was because we checked for the executor having any
tasks running before we remove the dropped tasks.

This patch fixes this issue by checking whether the
executor should be shut down *after* we've removed the
tasks that were dropped during agent restart.

Review: https://reviews.apache.org/r/65496/

asamerh4/mesos,dforsyth/mesos,jpeach/mesos,reneploetz/mesos,Gilbert88/mesos,jpeach/mesos,abudnik/mesos,gsantovena/mesos,dforsyth/mesos,kaysoky/mesos,Gilbert88/mesos,Gilbert88/mesos,dforsyth/mesos,kaysoky/mesos,kaysoky/mesos,chhsia0/mesos,chhsia0/mesos,jpeach/mesos,asamerh4/mesos,jpeach/mesos,chhsia0/mesos,chhsia0/mesos,reneploetz/mesos,gsantovena/mesos,dforsyth/mesos,kaysoky/mesos,dforsyth/mesos,andschwa/mesos,abudnik/mesos,asamerh4/mesos,gsantovena/mesos,andschwa/mesos,asamerh4/mesos,dforsyth/mesos,asamerh4/mesos,kaysoky/mesos,andschwa/mesos,abudnik/mesos,abudnik/mesos,asamerh4/mesos,jpeach/mesos,reneploetz/mesos,asamerh4/mesos,kaysoky/mesos,jpeach/mesos,chhsia0/mesos,Gilbert88/mesos,andschwa/mesos,chhsia0/mesos,gsantovena/mesos,reneploetz/mesos,reneploetz/mesos,gsantovena/mesos,dforsyth/mesos,kaysoky/mesos,chhsia0/mesos,Gilbert88/mesos,abudnik/mesos,reneploetz/mesos,jpeach/mesos,andschwa/mesos,gsantovena/mesos,abudnik/mesos,andschwa/mesos,gsantovena/mesos,Gilbert88/mesos,reneploetz/mesos,Gilbert88/mesos,abudnik/mesos,andschwa/mesos