Adding cf-isalive

Per @zzamboni request
See https://groups.google.com/forum/#!topic/help-cfengine/NmyIOyUMLxw
Applied @ediosyncratic suggestions
Merge branch 'master' into cf-isalive
Support for CFEngine 3.6
Updated with latest version
Mail report: always set the X-CFEngine mail header (Redmine #2403)
Log messages improvements in mail report code:

 * Add context for messages (Mail report:)
 * log levels: if the message is an error, use LOG_LEVEL_ERR
Redmine #6370: Discard call collect connection.

Instead of sending "BAD: Unspecified server refusal
(see verbose server output)" message to the call collected client
which is not having access to call collect simply refuse connection.

Message sent to the client is interpreted as a call collect queue
length and client assumes that connection is valid.
Merge pull request #1876 from pasinskim/ha

Redmine #6370: Discard call collect connection.
patch configure to correctly find libxml2
Redmine #4716: Lots of fixes to dirname(), esp. on Windows.

These problems were fixed:
* AddSlash() always adds Unix slash when argument is empty.
* DeleteSlash() removes root slash.
* DeleteSlash() does not handle repeated path separators.
* FirstFileSeparator() returns NULL on all relative Unix paths, even
  if it has a file separator.
* ChopLastNode() gives empty string when removing last directory
  component of a relative path. It should give '.'.
* ChopLastNode() does not handle Windows drive letters.
* ChopLastNode() does not handle repeated path separators.
* IsAbsoluteFileName() does not handle absolute paths on Windows that
  don't start with a drive letter. Both types are considered absolute
  paths.

This also fixes a Windows issue where creating a directory in policy
would lead to an error message about not being able to chdir into a
directory with the name ''. This was due to the final root slash not
being preserved.
Merge pull request #1877 from kacfengine/dirname_fixes

Redmine #4716: Lots of fixes to dirname(), esp. on Windows.
Merge pull request #1878 from MatthewCattell/mingw-libxml2-configure-fix

patch configure to correctly find libxml2
Switching to masterfiles inventory_os.description for attribute_name OS for portability
Revert "Remove uninitialized buffers as source of entropy."

This reverts commit 570724e752cf131132bb88e65a031f700b0ac424.

The reason is that in a chroot testing environment, there isn't enough
entropy available to satisfy OpenSSL, so it will bail out. Reverting
is not the correct fix for the problem, but right now we need tests to
pass, so postponing this for later.

Conflicts:

	libpromises/crypto.c
improve verbose message for package_list_command
Instead of only list arg[0] list while command, eg:
old: Reading package list from /usr/bin/env
new: Reading package list from '/usr/bin/env DEBIAN_FRONTEND=noninteractive LC_ALL=C PATH=/bin:/sbin/:/usr/bin:/usr/sbin /usr/bin/dpkg -l
see discussion in: https://groups.google.com/forum/#!topic/help-cfengine/nH6bR-n2x_c
also adjust message for old log format
Merge pull request #1885 from basvandervlies/improve_verbose_message_for_package_list_command

improve verbose message for package_list_command
Redmine #6441: Fix software_packages.csv being regenerated every time.

Do not allow '\r' to make it into the package string. If the package
manager puts '\r' at the end of the lines, it will cause later
comparisons to fail, so make sure to filter it out.
the detection of the package manager was wrong