Fixed a memory leak in the master's 'removeTask()' helper.
Fixed a memory leak in the master's 'removeTask()' helper.

Previously, all removed tasks were added to the
`slaves.unreachableTasks` map. This patch adds a conditional
so that removed tasks are only added to that structure when
they are being marked unreachable.

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

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