dns: add to DNSResponse support for mocked libevent
dns: avoid shadowing class variables
dns: make DNSResponse testable and add tests

In particular, the overflow check within the loop was not
testable (it took too long), so I reduced the size from
INT_MAX to SHRT_MAX. This is not a problem, because evdns
should never pass us more than ten results per query.