This commit adds config params to enable local DNS response caching and control its behavior, allow tweaking the cache size, ttl override and serving stale response.
While at it, ensure that config is validated, and fixing a bug related to reuse ctx between multiple upstreams resolving.