log_template_compile: function refactorized

This patch adds a LogTemplateCompiler that encapsulates the template
compilation process that is independent from actually formatting (or
evaluating) the template.  This reduces the number of parameters to parsing
functions and makes the code easier to follow.

The next possible step should be, that split the templates.c
file into more files.

This patch based on the log-template-refactor branch

Signed-off-by: Juhasz Viktor <jviktor@balabit.hu>
Add support for number unit suffixes

There are a number of cases in the configuration where one needs to set
a size (think buffer sizes), and counting zeroes is extremely annoying
and unintuitive. For this reason, we introduce number unit suffixes for
kilo-, mega- and giga-: K, M, G, respectively (case-insensitive,
optionally followed by a 'b' or 'B', for byte). The parser also
understands KiB, MiB, etc to indicate base-two units.

Anywhere where you can specify a number, you'll be able to specify one
with a unit suffix from now on:

 log-fifo-size(200M)

A function to parse longs already existed in basic-funcs (tf_parse_int),
which was moved to lib/parse-number.c now, and enhanced to recognise the
unit suffixes too.

This also closes #28.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
templates: fixed compilation error

This patch loosens coupling between LogTemplateCompiler and
LogTemplate and fixes a compilation error at the same time.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>