[DNS recovery]: implement a time to live refresh loop

This will refresh the DNS record on an interval.

The default time to live for the cached IP addresses
    is five minutes.

cc @sh1mmer @kriskowal @Matt-Esch
moved it into seperate variable.