Makefile.am: change library ordering in TEST_LDADD

Since libsyslog-ng-test.a uses symbols from libsyslog-ng.so, the .a file
should come first. The only reason this didn't cause issues is that so
far all test programs directly referenced the .so file too. If that
doesn't happen, linking errors ensue.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
gsockaddr: constify ip address parameter for GSockAddrInet constructor

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-ng-ctl: make control_name const

To fix a warning and to indicate that syslog-ng-ctl doesn't own that value.
It's only a borrowed reference, its memory is managed by reloc.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
host-resolve: factor host resolution related functions to its separate module
hostname: move local hostname related functions to its separate module
cfg: implement custom-domain() setting