Feature 2930: Eliminate hardcoded /bin/echo in acceptance tests

To improve cross-platform compatibility, eliminates acceptance test path
hardcoding of /bin/echo, as well as adjacent "mkdir" an "ln" commands in
10_files/02_maintain/staging/copy-select-link-dereference.cf, taking
advantage of the mechanism in the "G" bundle which finds the correct
local-platform paths for a list of common commands.
Replace hardcoded command paths in acceptance tests with $(G.cmd)

The "G" bundle provides full path names for various commands, in order
to eliminate the need to hard code pathnames in the acceptance tests.
Some older operating systems may have Perl installed in /usr/local/bin,
for example.

This commit updates all acceptance tests to make use of the $(G.cmd)
variables for each of the listed commands in order to eliminate
hardcoding of command paths in order to increase cross-platform
compatibility.
Timestamp on windows was getting truncated, 64 bytes should be enough for everyone...
Merge pull request #763 from jimis/bug2933

Timestamp on windows was getting truncated, 64 bytes should be enough for everyone...
Add default.cf.sub input in support of $(G) references

The two affected files did not include the default.cf.sub file
needed to support the global common "G" bundle which is
referenced.
Merge pull request #750 from mvpel/feature_2930

Feature 2930: Eliminate hardcoded paths in acceptance tests
Do not ScopeSetCurrent in ScheduleEditLineOperations
Do not ScopeSetCurrent in ScheduleEditXmlOperations
Do not ScopeSetCurrent in CheckControlPromises, push body frame
Fixed autotest after $(G) reference changes (7a3024c1a5c5b35).
Merge pull request #765 from kacfengine/14_reports_failure

Fixed autotest after $(G) reference changes (7a3024c1a5c5b35).
Be const-correct.
Introduce text mode to cf_popen and friends, for Windows support.

Part of issue 1884.
Use quoted path so "C:\Program Files" doesn't cause trouble.

Quoted paths are taken into account by the CommandArg0 function.

Part of issue 1884.
Add usemodule autotest for both Unix and Windows.
Remove unneeded static function (only used once).
Replace usage of inet_ntoa() with getnameinfo()

It's threadsafe and protocol independant.

Also removed a couple of possible silent-truncation bugs.
platform.h: put all system includes on top

Also fix some confusing indentation. And removed "#define __USE_GNU". This is
internal to glibc and should never be used, _GNU_SOURCE should be enough if
properly defined before all includes.
Include assert.h centrally in platform.h.
Added some debug messages and silenced a couple of warnings.