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>
cfg: free global LogTemplateOptions

This fixes a potential memory leak when global template specific
options were specified, such as local-time-zone(), send-time-zone() etc.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>