db-parser: publish pdb_rule_get_name() function

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: implement preference of complete match over a partial match

This patch changes how db-parser() finds the rule it matches. Earlier the
first applicable rule won, even if it was only a partial match. This
means that when rules overlapped, the shorter match would have been
found, if it was the first to be loaded.

This patch introduces a strong preference for rules that match the
input string completely. The load order is still applicable though,
it is possible to create two distinct rules that would match the same
input, in those cases the first one to be loaded wins.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
db-parser: implement r_find_all_applicable_nodes() function

This function finds all rules that would match a specific message.

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
pdbtool: add listing of conflicting patterndb rules

Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
Merge pull request #300 from balabit/f/patterndb-prefer-complete-match

F/patterndb prefer complete match