Fix missing include

Linux automatically includes <netinet/in.h> as a dependency of one of
the other include files, but this is not required by POSIX, and FreeBSD
doesn't do so.

Since we directly use some of the structs from that file,
add the include
Fully initialize hints

POSIX 1003.1 says:

 In this hints structure every member other than ai_flags, ai_family,
 ai_socktype, and ai_protocol shall be set to zero or a null pointer.

which Linux doesn't enforce, but FreeBSD does.
Fix cleanup in simple_test

If nbd-server dies during the test for some reason or other, then the
kill call in the cleanup subroutine would fail, causing (due to 'set
-e') the script to abort immediately. As a result, the "rm -rf" of the
tempdir wouldn't happen, which would leave cruft in /tmp.

Fix.
Add missing lfs.h include

lfs.h has an influence on sizeof(off_t), which has an influence on the
offsets of the SERVER data type, which makes things fail on 32 bit...
whoops.
Reorder LFS includes so it actually works
Remove duplicate ISSERVER definition
Make the implementation of size_autodetect follow the documentation

The documentation claimed that size_autodetect could return UINT64_MAX
if size autodetection would fail. In fact, however, it would call err(),
which is for fatal errors.

Additionally, the final test (to use lseek SEEK_END) would never be
called, since it was preceded by an if structure which would call return
in one of its branches and err() in the other.