bugfix: imudp makes rsyslog hang on shutdown when more than 1 thread used

closes https://github.com/rsyslog/rsyslog/issues/126
testbench: add test for potential imudp hang