bugfix: ommysql: handle/mem leak upon termination of worker thread

This could become bad if the (instance) worker threads are often
started and terminated. But it takes quite a while to show effect.
testbench: make extended mysql test a bit more elaborate
nitfixes
Merge branch 'v8-stable' of https://github.com/rsyslog/rsyslog into v8-stable