Improve regexp to avoid failures on HPUX

We were looking for two strings in output, and for that purpose used two
regcmps. One of those included '.*' after the desired string in
question, the other just '*'. The latter failed on HPUX because of spam
emitted for every cf-agent run, so the regcmp failed.
Key will be free'd in HandleConnection.
Merge pull request #1543 from aappilattoq/master

improve regexp to avoid bogus fails on HPUX
Make variable declaration as local as possible.
Merge pull request #1573 from jimis/agent_protocol_version

Key will be free'd in HandleConnection.
Redmine #4904: Fix incorrect ifdef test on HPUX.
Changelog update for old protocol default.
Merge pull request #1575 from jimis/minor

Changelog update for old protocol default.
Have only one beta section in the Changelog

Beta 2 changes were added to the beta 1 section.
Fix the strftime text for HPUX

Expunge one of the conversion specifications passed to strftime(3) for
HPUX only. The %F spec in common libc implementations is equivalent to
'%Y-%m-%d', whereas on HPUX it's something entirely different, expanding
to the locale-specific full month name (i.e. March).
MAC mode of sort() broken on HPUX, see #4934
Mark as broken on HPUX instead of sanitizing: issue #4940
Merge pull request #1574 from aappilattoq/master

hpux: strftime, sort
Add test for raising repaired class when existing file is templated

Ref: Redmine:4611 (https://cfengine.com/dev/issues/4611)
Compare existing mustache renditions with updated, in order to cfPS(CHANGE)

Close #4611
Redmine#4889: more tests for unresolved variables
Use full ExpandPromise for variables in BundleResolve

Does full evaluation of variables in BundleResolve, as opposed to
the previous more lightweight method.

Close #4889
Do not PolicyResolve on every merge in loading

No longer necessary due to heavier BundleResolve