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.
Mark as needswork on Win
Switch "touch" syntax to be compatible with HPUX.
Use PATH_MAX, not FILENAME_MAX for portability reasons.

HPUX has a ridiculously short FILENAME_MAX of 14 bytes.

Fixes 00_basics/validation/validation_tagging_directory.cf test.
Disable debug mode for 16_cf-serverd/01_start/002.cf as it was fixed.
Redmine #4733: Make edit_line CRLF aware.

This detects the newline mode before an edit begins, remembers it and
applies the same newline mode when the file is saved.

In many places where we know we are reading text files, we now switch
to opening in text mode on Windows, which is safe even if the file has
LF endings (either line ending will return LF in memory). On Unix it
has no effect.

For files contained within the /var/cfengine tree, I generally stick
to using binary mode, even for text files, since it lowers the risk,
and they don't generally need to be CRLF format anyway.
Silence a warning about unused argument.
Fix Windows registry test.

"ProgramFilesDir" is the correct name, not "ProgramFiles". Verified on
Windows 2008 and 2012.
Deal with the bogus pass on Windows — disable the test

findfiles() doesn't work, and the examples it is supposed to find are
not testable on win en masse -> disable the test.
Merge pull request #1580 from kacfengine/hpux_fixes

Hpux fixes
Merge pull request #1572 from kacfengine/crlf_in_editing

Redmine #4733: Make edit_line CRLF aware + plus minor stuff
Merge pull request #1578 from aappilattoq/master

sys.hardware_addresses not expanded on hpux
Unused variable.
Properly implemented receive timeout for windows.

Changed interface of some functions to receive timeout in milliseconds,
instead of struct timeval.
RECVTIMEOUT is now unused.
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.
Handle case of timeout set to 0, as block forever.
Guard against FD_SETSIZE limit for select()

Also document raising FD_SETSIZE for MinGW and some other
windows-specific hacks.
Do not ExpandDanglers in DeRefCopyPromise

Lists should be resolved at this point.