Mustache: acceptance test for default case and extra debugging
make masterdir configurable via configure option: --with-masterdir=<directory>
append masterfiles when CFENGINE_TEST_OVERRIDE_WORKDIR environment is set
sys.inputs is configurable via:
 * ./configure --with-inputdir=<directory> (default: sys.workdir/inputs)
Redmine#3870: acceptance test to ensure an empty template empties the file
Remove timegm replacement, it is only used in Linux-only code
Use the new functions
 * GetInputDir() for inputs directory (sys.inputdir)
 * GetMasterDir()  for masterfiles directory (sys.masterdir)
Add BufferNewWithCapacity, BufferGet
Fix incorrect array size causing stack corruption.
Add libcompat/getline
Make CfReadLine (potentially) dynamically allocate memory

This changes CfReadLine to work exactly like posix getline, except
that it does not include carriage return at the end.
Allow LoadFileAsItemList to load files with lines longer than 4096 characters

Close #3882
Update promise result from agent bundles
Use getline for function countlinesmatches (makes it dynamic)

Close #3852. Lifts restriction on ExpandAndMapIteratorsFromScalar for CF_BUFSIZE
Redmine#3882: staged acceptance test for large execresults
Add setup/teardown to expand unit test
Add acceptance test for #3852
Make internal promises not count against report data.

This is so that we can forcefully update the package database using a
promise, but not having that failed promise show up in the report
data.
Fix getline() on Windows.
Code improvements

Incorporating feedback received while reviewing the first iteration.
API improvements and code simplification.