Make configure checks able to build with -Werror

Also fix a few compiler warnings, this combined with pull #82 allows me to build
with CFLAGS="-Werror -Wall".
Initialize in6 correctly

This is technically wrong as it then gets used as an IPv4 sockaddr, but it only
needs to be some 0s so this is easier than changing the IPADDR data structure or
adding a new API.
Fix compiler warning in IPv6 check

(This was why I saw a warning from the IPv4 code path, now fixed by 7949e4c).
Check return values from some syscalls and warn if they fail
Merge pull request #85 from dgl/werror

Make configure checks able to build with -Werror