Ignore errors when closing file descriptors

Don't check the return value of closefrom(3) or fcntl(3) when closing
open file descriptors on startup.  If there are no file descriptors to
close, closefrom(3) will fail with EBADF on NetBSD and OpenBSD.  On
FreeBSD and Solaris, closefrom(3) is actually declared to return void.

Thanks to Stuart Henderson for reporting this bug.
Don't use <http://nagios-plugins.org/> for testing

<http://nagios-plugins.org/> redirects to <https://nagios-plugins.org/>
these days, and we don't want build-aux/make-openssl to stumble over SSL
issues when checking for browser availability.
m4/aio.m4: Use AIOLIBS for aio_init(3) check

Since commit 60ff499, the linker options required to use the POSIX AIO
API are saved into AIOLIBS instead of into LIBS.  This broke our
Autoconf test whether aio_init(3) is available.
m4/xprintf.m4: Fix vsnprintf(3) detection

Fix a copy and paste error in the definition of HW_FUNC_VNSPRINTF.

The issue was spotted by Dave Hart for the NTP project.
TODO: Add another wish list item

The client should queue commands and check results if the server is not
available.

Suggested by Daniel Parthey.
tests/input.at: Tiny cosmetic change
Fix tests if directory contains special chars
lib/pidfile/pidfile.c: Make Clang happy

Silence two "implicit conversion loses integer precision" warnings.
src/common/tls.c: Include <errno.h>

Include <errno.h>, as the "errno" variable is used by the
check_tls_error() function.
Don't stumble over CRLF in send_nsca.cfg(5) files

The client failed at coping with CRLF-terminated lines in
send_nsca.cfg(5) files.

Thanks to Paul Richards for noting this bug.
src/client/send_nsca.c: Remove nonsensical cast

Our xasprintf() returns no value.
Don't specify "unused" attribute in declaration

Specify __attribute__((__unused__)) only in function definitions, not in
function declarations.  The latter is unnecessary, and we didn't do that
elswehere in the code.
src/common/log.c: Flush stderr stream

Log output should not be buffered.
Add optional systemd(1) support to nsca-ng(8)

Make the server play nicely with systemd(1) (or any compatible init
system) by adding optional support for

- socket activation,
- the "notify" process startup type (see systemd.service(5)),
- the "WatchdogSec" feature (see systemd.service(5)), and
- systemd(1)-style logging to the standard error output (see daemon(7)
  and sd-daemon(3)).

No new nsca-ng(8) option has been added.  When compiled with systemd(1)
support, the server enables these features automatically if it was
socket activated.

The systemd(1) integration will remain completely optional.
etc/nsca-ng.cfg: Update comment

These days, users may specify "hosts" expressions.
etc/nsca-ng.service: Use title case in description

The unit files provided with systemd(1) use title case for their
descriptions, so let's do that as well.
etc/nsca-ng.socket: Add a description

... and pointers to the NSCA-ng server man pages.
src/common/util.c: Simplify an overflow check

Thanks go to Marc Espie for pointing out (in a discussion unrelated to
NSCA-ng) that the size_t overflow check in our string concatenation
function was unnecessarily complex.
src/common/util.c: Fix the overflow fix

There was a typo in our simplified size_t overflow check.  It wouldn't
have caught the len2 == SIZE_T_MAX case.

Thanks to Christian Siefkes for noting this.
etc/nsca-ng.service: Make sure socket is installed

| Usually you also want to make sure that when your service is installed
| your socket is installed too, hence add Also=foo.socket in your
| service file foo.service, for a hypothetical program foo.

[ daemon(7) ]