Fix null pointer reference in length() function.

It's legal for datatype_out to be NULL.
Added safe wrappers to creat, chown, lchown and chmod.

To prevent race conditions in path lookup when we change attributes.

Continuation of issue #3693.
Merge pull request #1140 from kacfengine/safe_stuff

Added safe wrappers to creat, chown, lchown and chmod.
Merge pull request #1141 from kacfengine/length_func_null_ptr_bug

Fix null pointer reference in length() function.
new function: packagesmatching
cf-upgrade

cf-upgrade is a specialized tool for automatically upgrading CFEngine.
The architecture is explained in the README.md file inside the cf-upgrade
folder.
Merge pull request #834 from tzz/tzz/feature-packagesmatching

new function: packagesmatching
Merge pull request #1089 from cduclos/cf-update

cf-upgrade
Forgot to add Makefile.am
Fixing some problems in Makefile.am

- Removing CXXFLAGS
- _CPPFLAGS = CORE_CPPFLAGS
Merge pull request #1148 from cduclos/cf-update

Forgot to add Makefile.am
Fixing build on MinGW

- Windows has no concept of group permissions nor other permissions on
files, therefore the code needed to be adjusted.

- There is no fcntl(...) system call in Windows.

- fsync(...) does not exist in Windows.
Merge pull request #1149 from cduclos/cf-update

Fixing build on MinGW
Fixing more build problems in MinGW

- Windows does not have wait.h

- More usages of S_IRGRP && S_IROTH

- Implementing an alternative way to check for a
process execution status in Windows.

- Disabling windows support until a better mechanism is found.
Merge pull request #1150 from cduclos/cf-update

Windows does not have wait.h
GetListReferenceArgument: wrap long lines
Add iteration outcome logging in enterprise
Add PROMISE_RESULT_SKIPPED

For those situations where an actuator decides to not act on a
promise for whatever reason (typically locking).
Add stub for generating diff states
Constify line parameter