[syslog-ng] Fix several memory leaks caused by configuration reloading