Fix autoscaler shutdown error reporting. (#4425)
Fix autoscaler shutdown error reporting. (#4425)

* Fix autoscaler shutdown error reporting.

If one of the two grouped functions crashed, nothing would happen at all because errgrp.Wait() will only return after **all** functions have returned either nil or an error.

This fixes that situation by exiting gracefully as soon as one of the grouped statements exit. The biggest offender here is the statsServer, which does not listen on a stop-channel to be shut down. We therefore shut it down immediately after the context signal arrives to make sure the entire group shuts down properly so the finishing `Wait()` call returns eventually.

* Review comments.

knative/serving,knative/serving