Add nss_mdns_gethostbyname4_r function

Apply patch from http://permalink.gmane.org/gmane.linux.debian.devel.pkg-utopia/11326
Fix compilation warnings in src/nss.c