Add DNSResolver.cancel method

It cancels all pending queries. All futures will be completed with an
error, having ARES_ECANCELLED as the errno.
Handle case when the Future returned by query() is cancelled