Include unix_dir.c when compiling under cygwin.
Fix missing type declaration.
Fix poor promiser form for commands promise
Spaces in commands type promisers cause warnings about binary not
existing. Any spaces in the promiser should be in the args attribute.
Closes Redmine 1277
Implement $(sys.cpus) on HP-UX platform

Uses the HP-UX mpctl() function to query the number of processors
available system-wide (as opposed to within a processor set) in order
to populate the $(sys.cpus) variable.

In HP-UX running on Intel Itanium Hyper-Thread Technology processors,
where each CPU core has two virtual cores, the total number of virtual
- rather than physical - cores is provided, which corresponds to the
behavior of the Linux scan of the /proc/stat file with HTT is enabled
on x86 platforms.

On a PA-RISC system, the total number of physical cores is set. The
PA-8900 processor has two physical cores per CPU socket, so an rp8420
with 16 PA-8900 processors will set $(sys.cpus) to 32, as expected.

It may be worthwhile to implement a $(sys.cpusockets) variable too,
in light of things like Oracle and Red Hat licensing.

The mpctl() function is documented at this page:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02264569/c02264569.pdf
Replace date +%s in testall with more widely compatible code (Mantis #1254)

In order to calculate the total run time of acceptance tests, the
testall script needs the UNIX seconds - a time() call - of the start
and end times of the test runs. It currently uses the command
"date +%s" to get these times.

Many older OS platforms - such as HP-UX 11.11, Solaris 8 and 9, and
others - do not support the "%s" format for the date command.

This patch creates a unix_seconds() subroutine which uses the modern
"date +%s" command if available, falls back to a Perl "print time()"
call, and failing that it falls back to pulling the octal date out of
a pax-created cpio header for an empty temporary file and converting
it to decimal using "bc."

This code will work on every POSIX-compliant platform (since the
pax/cpio/bc approach is strictly POSIX) as well as any platorm that
has a copy of Perl in the path.
Allow arbitrary shell command in cfruncommand (Mantis #1268)

cfruncommand may contain arbirtrary shell command, but was validated as an
absolute path. Relax the constraint to match the semantics.
Sanely reimplement splayclasses() (Mantis #1307)

Previously due to miscalculation in CFEngine, daily splayclass was actually
triggered every hour on ~4.17% of all computers.

Existing logic was very opaque, reimplement it sanely.
Allow paths up to 4096 bytes in MD5 network protocol command (Redmine #1199)

Previously filenames were silently truncated. Full audit of filename paths
handling and error modes is pending.
Refresh more state on cf-serverd reload (Redmine #1487)

Previously roles and ACLs on resources were leaking memory over time.
Split setting timeout on fd into separate function
Implement receive network timeout on server-side

Previously stale connections were stuck for a long time if something went wrong
(up to several hours), so server may ran out of connection limit.
Decrease duplication of code
Fix wrong message if abortclass kicks in (Redmine #1077)
Restore scopes after reloading policies in cf-monitord.

(Redmine #1485)
Unexport ComparePackages, not used outside of compilation unit
Move internal package version comparison function to separate module
Move code related to packges promises to cf-agent from libpromises
WMI is deinitialized using atexit(3) instead of GenericDeInitialize

Previous arrangement required WMI code to reside in libpromises
Link libcfagent.la into cf-agent instead of libpromises
Whitespace