Rewrite autoscaling and enable easier configuration of worker selection and autoscaling behaviour

Should be from com.google.common