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.
Simplified some braindead logic, added comments.
ScopeDeleteSpecial() is unecessary before ScopeNewSpecial()

...pinpointed by the latest WARN messages.
Fix regression of setting VIPADDRESS to 127.0.0.1

See redmine #3010, now it's set to the first address of non-loopback
interface.
Made file copies and edits preserve extended attributes.

This means that ACLs and security context information will be copied
along with a file if the "preserve" attribute is set and the copy is
local, or if the copy is part of an edit operation. For remote copies,
only Unix mode is preserved. If the preservation is unsuccessful, the
promise will fail.

Solves issue 2728.
Changing lsdir to consistently return an slist

If a directory is passed to lsdir which does not exist, it will return
the mismatched type scalar, as compared to its normal return and the
dictated return type in its function definition entry of slist.  This
causes all evaluation to stop in the event of a missing directory due
to mismatched assignment in a var designated as slist.
Switching to new use of CF_NULL_VALUE as requested.
Merge pull request #776 from werkt/master-lsdir-slist

Changing lsdir to consistently return an slist
Fix global log level being reset in newly created threads.
Merge pull request #781 from kacfengine/global_log_level_fix

Fix global log level being reset in newly created threads.
Fixes redmine #2988 otrs #1221. Get rid of special chars in debian6/7's /etc/issue
Fix cf-execd sending too many emails.

Timestamps in the log file would make all cf-agent logs look different
so cf-execd would send an email on every run, even if nothing changed.
Fixed by removing the timestamps before comparing each log line.

Fixes issue 3011.
Add StringNotMatchingSetCapped as a replacement of size/exclude-list restricted sscanf
Fixes redmine #2626 getindices should not truncate its keys beyound 127 chars
Fixes redmine #2698 strings larger than 2048 and up to 4096 can be added to files
Merge pull request #785 from jeffali/temp/2698_2626_2

Fixes #2626 and #2698 (strings size limits were hardcoded in sscanf call)