minor modules.dnsutil._to_seconds() cleanup

* rename `time` arg to avoid shadowing imported `time` module
* catch more specific exception when doing conversion to int