Socket leak fix in call-collect.

When the client's cf-serverd decides not to wait for the hub's queue
to die down, logging that decision is not enough: it needs to actually
close the socket and not fall through into the code that delivers the
report.  ConnectionInfoNew() can't fail, so testing for that was dumb
(and, if it'd made any sense, should have had an else clause to close
the socket).  Added some pertinent assertions.
Avoid needing to cast a pthread_create()'s function.

Change cf-serverd/server.c's HandleConnection to take a void* and
internally read it as a ServerConnectionState *, so as to avoid a
complicated and ugly cast.
Document failure to kill the test server on HPUX.

Unfortunately it is the best we can do, since it is not overridable
from the environment.
Merge pull request #1581 from kacfengine/document_hpux_ps

Document failure to kill the test server on HPUX.
Do not ExpandDanglers in DeRefCopyPromise

Lists should be resolved at this point.
Add namespace scoped softclass checksum_alerts to heap.

Previously just persisted. Additonally, fix ordering of arguments
to EvalContextHeapPersistentSave call.

Close #5014
Redmine#5014: add checksum_alerts to the file change tests
Ted's Rework FnCallFold to use VarRefValueToJson and sorting helpers

With a few adjustments.
01_vars/02_functions/sort.cf: turn off the int_ip and real_ip sorting tests temporarily
Merge pull request #1583 from ediosyncratic/clean-call-collect

Some minor clean-up in code related to call-collect.
Enable compilation of mock-package-manager on Windows.
Nuke the unneeded linux conditional
getfields example: remove gid from comparison

On HPUX the field will return 3, not 0 as on Linux or FreeBSD, and since
gid is not essential, just remove it here
lsdir example: improve on the assumptions of what's in /etc

Assumption that /etc/shadow exists is some *ism, as it doesn't exist on
either FreeBSD or HPUX. Replace with the group file, which should be
friendlier, and also ensures that the example illustrates sorting.
strftime example: replace %F with %Y-%m-%d to pet HPUX
Amend per discussion (character classes)