value-pairs: fix handling subsequent hierarchical elements

When two hierarchical elements are subsequent to each other, the first one
wasn't properly closed when iterated using value_pairs_walk()

The problem was that value_pairs_walker() didn't validate that the
existing stack contents match the name being rendered, causing the new
prefix not to be recognized.

For example, if the following two name-value pairs come after each other:
  * .unix.cmd
  * .json.foo

Then, when .json.foo is being processed, vp_walker_name_split() determines
that "foo" is the key, without checking that ".json" is in a different
prefix than the previous name-value pair, which in turn causes
the obj_start() call to be omitted.

The code is now restructured so that we unwind first to the proper prefix
(calling obj_end() as needed), this ensures that we already are at
the proper prefix, then do name_split() which calls obj_start() as needed,
and then process the value.

The change also removes the return value from vp_walker_stack_unwind_until()
as we always use the top of the stack anyway.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
system-source: remove unneeded log {} block from unix-dgram

The generated configuration doesn't need a separate log {} block,
as channel {} is just an alias to log and we already can use
any configuration element just fine.
Merge pull request #151 from balabit/f/simplify-unix-dgram-channel-in-system-source

system-source: remove unneeded log {} block from unix-dgram
Merge pull request #152 from balabit/f/value-pairs-fix

value-pairs: fix handling subsequent hierarchical elements
afsmtp_dd_free: do not free the str String in dd_free,

because it is already free in thread deinit

Signed-off-by: Juhász Viktor <viktor.juhasz@balabit.com>
Merge pull request #155 from juhaszviktor/master

afsmtp_dd_free: do not free the str String in dd_free,
configure.ac: avoid the rabbitmq configure script if Python 2.5 is not available

Because that causes the rabbitmq configure script to fail with a difficult
to diagnose error message.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Merge pull request #158 from balabit/f/dont-configure-rabbitmq-without-python

configure.ac: avoid the rabbitmq configure script if Python 2.5 is not available
afsmtp: check whether body and subject is set, instead of crash if they are NULL

Signed-off-by: Juhász Viktor <viktor.juhasz@balabit.com>
Merge pull request #159 from juhaszviktor/afsmtp

afsmtp: check whether body and subject is set, instead of crash if they ...
logreader: Memory leak fix

Free poll_events in log_reader_free().

Signed-off-by: Tibor Benke <tibor.benke@balabit.com>