dbparser: added unit test to cover db-parser() parsers

An incomplete unit test to individually test various parsers as implemented
by the radix tree in db-parser(). Currently only @STRING@ and @QSTRING@
is covered.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
db-parser: fixed @STRING@ parser when ran at the end of the message

When @STRING@ was used right at the end of the message, it stepped outside
its input buffer and adding memory garbage to the parsed value.

This could only happen if:
  - the parsing parameter specifies characters in addition to isalnum()
  - the characters after the input buffer are either alphanumeric are
    within the characters specified as terminating characters or NUL

Reported-by: Evan Rempel <erempel@uvic.ca>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>