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.
Fixes segfault due to sscanf not size limited (redmine #2912)
Merge pull request #786 from jeffali/temp/2912

Fixes segfault due to sscanf not size limited (redmine #2912)
Merge pull request #790 from kacfengine/ubuntu_test_failure

avoid testcase failure in non-debian env
Internal data coherence checks + removal of keys from lastseen and fs
Fix symlinks being destroyed when editing them.

With this fix we dereference the link and edit the pointed-to file
instead.

Fixes issue 2363.
Merge pull request #770 from jimis/bug3010

Bug3010
Merge pull request #791 from kacfengine/issue-2363

Fix symlinks being destroyed when editing them.
Fix missing "promise kept" status for the last line in a file.

For the last line we shortcut out using MatchRegion, but previously
we did not set the promise status.

Fixes issue 2943.
Fixes redmine #2861 : deleting inexisting package should be marked as KEPT
Acceptance test for removing a package that does not exist / not installed
Add a unit test for MatchRegion in item_lib.c.