Add extra diagnostics for debugging issues with the DNS cache resolver
Avoid invalid memory access on expiry
Merge pull request #39 from Metaswitch/dns_expiry_valgrind

[Reviewer: Mike] Avoid invalid memory access and memory leak on expiry of DNS entries