loggen: fix no-framing option

Signed-of-by: Tibor Benke <btibi@balabit.hu>
filter-in-list: Ignore empty lines in the input file

Ignore empty lines in the input file, because an empty value would match
those, and we do not want that.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
filter-in-list: Fix a compilation error on FreeBSD

Do #include <string.h> for memcmp(), strcmp() and strlen(), since we're
using those functions directly.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
templates: use the global options if NULL is passed as template_options

Use the global template-options structure in GlobalConfig instead of a
hard-wired set of defaults when the template_options argument is NULL.

This is a minor change in user visible behaviour, as the global
ts-format(), frac-digits() and time-zone related options will
become effective to the call-sites which didn't provide their own
idea about template options before.

Previously, a hard-wired set of defaults were used, e.g.:
  - frac-digits(0)
  - ts-format(bsd)
  - neither local-time-zone nor send-time-zone are set

Out of these, only frac-digits() have some chance to actually break
user-configurations as the call-sites that used the hard-wired values
are not really likely to use time related macros.

The confusion of not applying the global options is potentially larger,
not to mention the code complexities this causes in all drivers using
templates.

These are the call-sites that used the hard-wired values before:
  - filter expressions that use the comparison operators
  - regexp based substitutions
  - incoming templates for parsers
  - the new value rewrite rules
  - smtp values
  - the just introduced drivers (stomp, amqp)
  - patterndb context-id

The consequence of this patch that we're going to have a LogTemplateOptions
available in template functions too.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
value-pairs: Require LogTemplateOptions to be passed at run-time

Instead of storing a borrowed LogTemplateOptions copy, require passing
one in at run-time (via value_pairs_foreach() or value_pairs_walk()).
This provides more flexibility, and can guarantee thread safety too.

All drivers that use value-pairs have been updated accordingly.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
format-json: Support acting on type hints

With this patch, $(format-json) becomes able to act on type hints, and
store ints as ints and so on and so forth.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>