This makes the ES tests more universally available (they should now
also support running in containers). It also simplifies the tests
as fewer support files are needed.
Commit 96b5fce introduced regressions, leading to potential misadressing
and a very probable memory leak. This commit fixes the issues and
hardens the module to better detect some error cases in the
future.
It also adds valgrind-based testbench tests which ensure that no
pointer errors exist. If they had been in place, the regressions
would never have been undetected.
Note that commit 96b5fce was introduced in 8.23.0 on Nov, 15th 2016.
Many thanks to Yaroslav Bo for alerting me on the root problem and
providing a very good analysis and guidance.
see also https://github.com/rsyslog/rsyslog/issues/1906
closes https://github.com/rsyslog/rsyslog/issues/1962
see also https://github.com/rsyslog/rsyslog/issues/1964