Thanks to islandberry's suggestion:
 - Added package comment
 - Removed pointer to lock mutex
 - Switch to time.Duration for ttl

Also made the test more robust against dns being returned in different order.