[Reviewer: Mike] Dns expiry valgrind

This adds tests to verify the behaviour of DNS cache expiry. I've verified that valgrind reports a memory leak and an invalid read when running without https://github.com/Metaswitch/cpp-common/pull/39, but that that commit fixes them.

Don't merge this yet - once you merge https://github.com/Metaswitch/cpp-common/pull/39 I'll point this at cpp-common/master and merge it.