using setenv instead of putenv to prevent memleaks
fixed Wlog_Uninit to also free child logger
Merge pull request #1789 from MartinHaimberger/mh-memfixes

Fixed misc leaks