Tested unreachable task behavior on agent GC.
Tested unreachable task behavior on agent GC.

Updated `PartitionTest, RegistryGcByCount` test. This test fails
without the previous patch.

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

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