First stab at saner handling of errors.
Converted dns2mdns code to be more sensible, hopefully reacting correctly to errors on fd + transient single errors as well doing requests.