make dns a abstract class

with dns a abstract class, we can provide a alternative dns engine for http client.