Avoid extra `predicate()` calls (#3869)
Avoid extra `predicate()` calls (#3869)

In `SubsetLoadBalancer::HostSubsetImpl::update()` we have repeated calls
to `predicate()`. These calls are expensive mostly because of
`Envoy::Config::Metadata::metadataValue()` calls. Furthermore, metadata
is guarded by a lock since #3814 — so there is some contention too.

This change improves things by doing two things:
* avoid use of `predicate()` to derive `healthy_hosts_per_locality`
* cache `predicate()` calls for the special case of only metadata
  changing (current hosts == hosts added)

Signed-off-by: Raul Gutierrez Segales <f25f6873bbbde69f1fe653b3e6bd40d543b8d0e0@pinterest.com>

istio/envoy,dnoe/envoy,dnoe/envoy,envoyproxy/envoy,istio/envoy,envoyproxy/envoy,jrajahalme/envoy,envoyproxy/envoy-wasm,lyft/envoy,envoyproxy/envoy,eklitzke/envoy,jrajahalme/envoy,envoyproxy/envoy-wasm,lizan/envoy,envoyproxy/envoy,lizan/envoy,jrajahalme/envoy,envoyproxy/envoy-wasm,istio/envoy,lyft/envoy,eklitzke/envoy,envoyproxy/envoy-wasm,envoyproxy/envoy-wasm,envoyproxy/envoy-wasm,istio/envoy,istio/envoy,jrajahalme/envoy,envoyproxy/envoy,lizan/envoy,envoyproxy/envoy,eklitzke/envoy,envoyproxy/envoy,eklitzke/envoy,envoyproxy/envoy,envoyproxy/envoy,lyft/envoy,lizan/envoy,dnoe/envoy,jrajahalme/envoy,lyft/envoy,lizan/envoy,istio/envoy,envoyproxy/envoy,envoyproxy/envoy-wasm,jrajahalme/envoy,lizan/envoy,dnoe/envoy,eklitzke/envoy,dnoe/envoy,istio/envoy,lyft/envoy,lyft/envoy,envoyproxy/envoy,envoyproxy/envoy,eklitzke/envoy