Adding support for hostname cache expiration.

@ThanosBaskous @dmontauk @kevinballard - A small patch to enable expiration of the hostname cache in Diamond.