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>
Merge pull request #112 from talien/f/value-pairs-fixes

Various value pairs-related fixes.