syslog-ng: Refactor configuration generation logic.

The old method was hard to maintain, so this commit introduces a more clean solution.
The commit also contains documentation fixes and new testcases.
Merge pull request #88 from ihrwein/syslog-ng-refactor2

syslog-ng: Refactor configuration generation logic and add more unit tests