value-pairs: Handle SDATA enterprise IDs correctly

RFC5424 SDATA IDs are of the form "[win@18372.4 foo=bar]", which
translates to "sdata.win@18372.4.foo=bar" internally. In this case, we
should not split the "4" into a separate object, but treat it as part of
the sdata ID.

To do this, the name splitting was enhanced, and instead of splitting by
every dot, it will look for @ too, and only split a token off after
that, if a dot is followed by a non-number. A test case to verify the
behaviour is also included.

Signed-off-by: Tibor Benke <btibi@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
value-pairs: Restructure vp_walker_name_split()

Instead of splitting tokens into an array of gchar*s, use a GPtrArray
instead, so that vp_walker_name_value_split() does not have to copy from
a pointer array to a string array.

Also introduce vp_walker_name_combine_prefix(), a short function to
replace the g_strjoinv() we used before.

The advantage of this is that it's much easier to extend later, for
example with array support. The code of vp_walker_name_split() becomes
easier to follow too.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
value-pairs: replace trash stack with own stack implementation

Because of the g_trash_stack and its usage problems could arise when
the strict-aliasing compile option was set leading to bad value-pairs
expansion. With the own implementation the bogous usage of g_trash_stack
is supposed to be eliminated.

Signed-off-by: Daniel Gados <gdani@balabit.hu>