..F....... [ZBX-8302] ported refactorings from ZBX-8302


git-svn-id: svn://svn.zabbix.com/trunk@46335 f4e7fd02-d210-4e34-a1e0-d4093fb66cc2
...G...... [ZBX-8327] fixed possible crash when processing Windows eventlog
           [merge ^/branches/2.2 -c r46340]


git-svn-id: svn://svn.zabbix.com/trunk@46345 f4e7fd02-d210-4e34-a1e0-d4093fb66cc2