db-parser: move inherit_properties to the content field where it belongs

This field was erroneously in the PDBAction struct whereas it should have
been part of its "content" member, as it is completely RAC_MESSAGE specific.
There are currently no other action types though.

The patch also renames inherit_properties to inherit_mode in preparation of
the "context" inherit mode.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: refactor pdb_action_generate_default_message() to smaller functions

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: extract pdb_context_get_last_message()

Instead of peeking into PDBContext's message list to get the last message,
create a designated function for this purpose.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: use explicit enum references in the data structure

Following a review comment by Viktor Juhasz, I've named all the enums
in patterndb-int.h and referenced it from all around the data structure
to make their relations more explicit.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Merge pull request #289 from balabit/f/dbparser-testing

F/dbparser testing
libtest: add assert_log_message_value_by_name() function

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
libtest: fix compilation warning in assert_msg_field_equals_non_fatal()

WIP: a very similar function is available in msg_parse_lib
db-parser: fixed compilation warning about a stray space in a string literal

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: split inherit-properties testcase into 2 smaller functions

And simplify their fixture patterndb a lot.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: create new _construct_message_with_nvpair() function in test_patterndb
db-parser: add msg_matches to output msg assertions
nvtable: add nv_table_is_value_set() function

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
logmsg: implement log_msg_merge_context()
db-parser: implement inherit-properties='context' for patterndb actions

This patch implements a new choice for inherit-properties that will merge
all name-value pairs into the new synthetic message, with the most recent
being beferred over older values.

Tags are not being merged, right now the last message determines
the set of tags that are assigned to the new message.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>