cf-serverd: free getaddrinfo() result, on error of OpenReceiverChannel()

getaddrinfo() may allocate the 'result' struct even in cases where it
will return an error. Take care to free memory, although we would exit
the server process anyway.
(cherry picked from commit 7472e2016626481558f0922e5e8101bc8f26e569)
cf-serverd: getaddrinfo() will use a numeric port, no lookup

This `AI_NUMERICSERV` flag avoids looking up the "services" table for
a string port resolution, according to the manual.
(cherry picked from commit 5fe15aeca4ccd7c8a8100bfa9dce552b4eedafe1)
cf-serverd: getaddrinfo() will NOT set "errno" upon failure

It has its own `gai_strerror()` function to resolve its (reentrant)
result code.
(cherry picked from commit cbff1c1afb04ae5fa84ab2dd170c901e7fdb732b)
cf-serverd: fix typo for addrinfo constant

As spotted by Dimitrios Apostolou
(cherry picked from commit 39788ff4d628ecc330dce0dbc2d3d6586259c964)
Update verify_users_pam.c

Updated for bug https://cfengine.com/dev/issues/5485 as requested by Volker Hilsheimer.
This will allow compile on NetBSD.
Tested on NetBSD i386 version 6.1.3.(cherry picked from commit 67ec36c78f8c25181a4caaafdcccbb31f2c46ca5)
Remove AI_NUMERICSERV from getaddrinfo() call.

On Windows, although defined, it is not supported by Microsoft's
network stack.
(cherry picked from commit 67f2747a60e597021401f563b30df446b1970471)
X509_gmtime_adj() and OpenSSL 0.9.8 overflow on 32-bit windows.
(cherry picked from commit 06a5ecf04a5d3cd6497042a2b85d9fa19c097cf2)
Yield cf-serverd lock at the end of its execution.
(cherry picked from commit 4960b7c1e40bc70efa696446ffe7806bbf32b4cb)
Give GenerateDiffReports access to the agent config.
(cherry picked from commit 176d10cb09ccfd066f6997a13b349601e9d3bcce)
Failing to set SO_LINGER is not a catastrophic event, do not exit.
(cherry picked from commit ea9dc564e026364003967f9aa9f3908f031a2254)
Do not log at level ERR non-catastrophic events.
(cherry picked from commit bda5cfd464c2a71e8c9a873cdbb41eb233af722a)
The caller exits, no need to do it in the callee.
(cherry picked from commit efd65c4c29f304ddb0571d03f227cdbf4aeee628)
Merge pull request #1697 from kacfengine/3.6.x_backports

3.6.x backports