value-pairs: the DATE should always contain the stamp time

Formerly it contained sometimes the stamp time and sometimes the
received time. From now it will always contain the stamp time.

Signed-off-by: Daniel Gados <gdani@balabit.hu>
value-pairs: adding sdata to the syslog-proto (RFC5424) scope

Signed-off-by: Daniel Gados <gdani@balabit.hu>
value-pairs: the key option of value-pairs is expanded to macros

Formerly it was expaned only to nvtable entries, but from now it
expands to macros as well without setting the scope.

Signed-off-by: Daniel Gados <gdani@balabit.hu>
format-json: fixing that the SEQNUM macro does not expand

Signed-off-by: Daniel Gados <gdani@balabit.hu>
afinter: Added internal queue length statistics

It can really help cases, when internal() driver is not used, and internal
queue starts to queue up. The best would be not posting when no internal()
is present, and this change whould be rather trivial, but I thought there
is a reason why we work like this, so I didn't change that.

Signed-off-by: Tusa Viktor <tusavik@gmail.com>
Merge pull request #110 from gdani/f/value_pairs_bugfix

value pairs bugfixes
Merge pull request #113 from talien/f/internal-queue-length-stats

afinter: Added internal queue length statistics
value-pairs: Split name before try to unwind the VP stack.

Splitting the name sets up the stack properly, so we can
unwind it afterwards. Added unit tests too.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>
value-pairs: Fixed a memory leak in value-pairs.

We should free the elements of the GPtrArray too, not just the GPtrArray.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>
value-pairs: Value pairs functions should honour time zone mode.

Time zone mode specifies if we should use the local timezone or the send
timezone when formatting time related macros. Value-pairs foreach/walk
functions also can format time related macros, so we should propagate
the time zone mode down to these functions, instead of wiring LTZ_LOCAL.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>