tests/functional: validate that no additional messages are delivered to a destination

This patch adds validation that no extra messages get delivered to
a destination.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg-tree: fix node flag propagation

This patch fixes the application of node flags during compilation. Earlier
the node flags were either applied to the first_pipe (normal log paths
lacking a source reference) or the last_pipe (log paths that did contain
source references).

The issue is that due to the compilation of junctions, the last_pipe may
not be reachable through LogPipe->pipe_next list, which is iterated in
log_multiplexer_init() when looking for LC_XXX flags. Rather they are
only reachable through an intermediate LogMultiplexer's next_hop list.

This causes the flags to be missed when evaluating the compiled structure.

This patch tries to apply flags to the first LogPipe ever encountered while
compiling the sequence and only resort to the last_pipe if we don't encounter
anything that would start with a sub_pipe_head.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
tests/functional: added tests for final flag after embedded log statements

The final flag was incorrectly processed for log statements where it was
specified after a set of embedded log statements.

This adds a testcase that validates that.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>