Fixed another task accounting bug.

When apps are shut down or scaled down, we need to wait until we get
acknowledgement before removing those tasks from Marathon's state.