Split connection and the DNS resolver

The idea is to simplify the connection object as much as possible
and then to migrate it to use std::function.