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
clarify that on() starts day and month on 0 (bad, but changing would break back-compat)
test for on(), primarily to test integer size on some unices
Change: Add alternate unescape form to mustache render quotes test

The mustache spec allows variables to be inside of `{{{`.
This extends the test to cover that style in addition to including the
characters to not escape.
Merge pull request #1917 from nickanderson/redmine/6516

Change: Add alternate unescape form to mustache render quotes test
Reload HA configuration when policy is changed.

After policy is changed make sure that HA configuration is reloaded.
This is needed by the cf-serverd as we don't want to restart it all
the time HA configuration is changed.
Conform to revised coding style for do { ... } while (...);

Spacing change only: put the opening { on a line of its own, not after
the do, so that it lines up with the closing }; and put the while on
the same line as the closing, so as to make clear that we're not
looking at a while (...) { /* empty */ } written as while (...);

Did also include one blank line for clarity of reading.
Change "Unacceptable model uncertainty" message and its log level.

It's not the most intelligible message - so reword it to give the
reader some chance of understanding it - and it's kinda spammy (albeit
more so than usual, lately, thanks to my recent bug in the parser).
Also add the name of the field we thought we were parsing, as that's
relevant.
Interpret failing function calls in ifvarclass/if/unless as class not set.

ifvarclass is treated explicitly during the evaluation of a promise.
Function calls might fail due to unexpanded variables in arguments or
for other reasons, in which case the classes should be assumed not to
be set.

Remove unused function in eval_context.c, make static equivalent
in promises.c, where it is used.

Include acceptance test.

Fixes Redmine 6327. Can't be cleanly cherry-picked into 3.6.x.
disable unstable unit test on Solaris
Merge pull request #1921 from ediosyncratic/do-while-style-fix

Conform to revised coding style for do { ... } while (...);
Merge pull request #1923 from ediosyncratic/model-uncertainty-quieter

Change "Unacceptable model uncertainty" message and its log level.
Fix blatant memory trample.
Fix for uninitialized pointer free in SocketConnect().

As pointed out by @worr in #1918, failure of getaddrinfo() may leave
response2 unset, in which case calling freeaddrinfo() on it is apt to
crash.  None the less, nothing guarantees that failing getaddrinfo()
won't set the response list (e.g. when OOM prevents it allocating
space for further entries).  So initialise it to NULL.

Also move the declaration closer to its use.
Protect against freeaddrinfo(NULL);

Apparently some implementations don't handle this gracefully.
/me bangs head on wall, but is glad I googled.
Fix another addrinfo corner case in SocketConnect().

The initial call to getaddrinfo() is subject to the same concerns as
the secondary one, as noticed by @jimis in code review.
Merge pull request #1924 from vohi/redmine/6327

Redmine 6327 - Interpret failing function calls in ifvarclass/if/unless as class not set
Merge pull request #1919 from ediosyncratic/trample-fix

Fix a memory trample and some bad freeaddrinfo() calls.
Improve test case for ifvarclass with functions

As per feedback to ediosyncratic, make sure we test the positive
case as well, and use standard "ok" class to mark pass/fail.