preparation for asynchronous DNS resolution

This is an initial step towards fully asynchronous DNS resolution.
Right now it improves things by loading the resolution off to a separate actor with potentially dedicated dispatcher.
The code is covered by TcpConnectionSpec "report failed connection attempt when target cannot be resolved", although only unsuccessful resolution is tested.

Fully asynchronous DNS client coming soon, it's already working in production, but isn't 100% RFC compliant.    
Me too.

I think we need a concurrent cache here, but in case of naïve InetAddress() implementation we don't know the ttl. On the other hand we can assume some short ttl, 1 minute or so.

The API usage will then look like this:

Dns.resolve(name) { r: Resolved =>
  doSomething(r.addr)
}
// otherwise it will be delivered as a Resolved() message

////  OR 
Dns.resolve(name) match {
  case None => // will be delivered in a Resolved() message
  case r: Resolved => 
    doSomething(r.addr)
}