IsValid accepted a deployment as long as its status reported an
available replica. When the idle reaper scales the deployment to zero,
Spec.Replicas drops right away but the status can still count the pod
that is shutting down, so a cache hit kept routing requests to it.
Export the availability check from executor/util, make it look at the
spec as well, and use it in the container and newdeploy IsValid paths.
WaitForDeployment returned as soon as AvailableReplicas was high enough, without checking that the status belonged to the current spec. UpdateScale only writes the spec, so a Get issued right after it can still carry the previous generation's status, counting the pod that is being torn down.
Gate AvailableReplicas behind ObservedGeneration, the same condition WaitForDeploymentRollout already uses in the integration framework.