Merge pull request #1809 from jimis/cfupgrade

cf-upgrade sanitisation
Merge pull request #1810 from jimis/cfupgrade

S_IROTH is undefined on windows, include our platform.h.
Merge pull request #1812 from jimis/cfupgrade

S_IROTH undefined in windows in log.c.
Log messages from reports promises to event log on Windows.

Use portable LogToSystemLog function to that end.

Fixes Redmine #6315
Merge pull request #1813 from vohi/redmine6315/log_reports_to_event_log

Log messages from reports promises to event log on Windows.
Disable failing unit test on Solaris.
Use more compatible sed arguments.

"sed -r" is not supported on Solaris 9 (and probably others).
Merge pull request #1814 from jimis/cfupgrade

Revert recent dependency on libutils, use a simple ifdef instead
disable two failing unit tests for aix
Merge pull request #1815 from MatthewCattell/disable-failing-aix-unit-tests

disable two failing unit tests for aix
Fix build.