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.
Fix DeMangleVarRefString with special symbols in legacy array indices

Activate acceptance test. Close #4301
Redmine#4909: staged test for the interpolation of empty lists
Fallback to bundle qualification in VariableGet

This should be structurally unnecessary, but is a temporary measure pending
rework in variable iteration. See comments in commit for more details.

Activate acceptance test, Close #4889
Redmine#4899: adjust acceptance test for new old behavior
Undo workaround for tests/acceptance/15_control/01_common/inputs_from_readstringlist.cf
Make sure to resolve for non-method bundle calls in DeRefCopyPromise

Close #4890
Merge pull request #1543 from aappilattoq/master

improve regexp to avoid bogus fails on HPUX
Make variable declaration as local as possible.
Revert "Quick and dirty fix to get CRLF support in edit_line promises on Win."

This reverts commit 9ca10d35190a646cc6f4f4ff43a4ec79468b9a10.
Improved error messages when chdir fails.
Move Windows specific initialization to enterprise.
Also test for crash in readtcp_connection_fail acceptance test.
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.