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.
Merge pull request #770 from jimis/bug3010

Bug3010