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)
Use the new functions
 * GetInputDir() for inputs directory (sys.inputdir)
 * GetMasterDir()  for masterfiles directory (sys.masterdir)
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.
Marking connection as invalid
Removing old collect call implementation
More collect call fixes
Fixing compilation

When merging the code from upstream a variable declaration was removed.
Retrying SSL_accept and SSL_connect if error.