F/patterndb prefer complete match

This series changes the matching algorithm that db-parser() uses: it will prefer complete matches over partial ones, effectively making the choice a bit more smart. Earlier, it is possible that the first, non-complete rule "steals" the message from a subsequent but more complete rule.

It should solve a number of unintuitive situations with patterndb.