stats: decouple stats from GlobalConfig

Use a separate StatsOptions structure and separate grammar rules to
parse them. The stats subsystem became independent of the GlobalConfig
class, it just happens to use a member.

This patch also removes stats-timer.c as the timer requires access
to the global StatsOptions instance.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afinter: add inclusion to mainloop.h

Earlier this include was acquired through stats.h, but that header got
rid off that.
stats: publish StatsCounter struct

Only to be used internall by the stats implementation.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
stats: add accessor functions for source/destination/tag names
stats: add stats_foreach and stats_foreach_remove() functions

To make the internal stats counter hash accessible by other stats related
modules.
stats: move code to generate CSV to a separate module
stats: use source/destination/tag accessor functions everywhere

and remove access to the underlying arrays, except from the accessor
functions.
stats: rename StatsCounter to StatsCluster

This patch renames StatsCounter to StatsCluster that better describes its
purpose, as it encapsulates a cluster of related counters.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
stats: move syslog facility/severity statistics to a separate module
stats: remove misc.h inclusion
foo: bar
foo: bar2
stats: extract StatsCounterItem into a separate module
stats: extract StatsCluster into a separate file
stats: extract stats registry into a separate module
stats: merge with StatsCluster extraction
stats: change stats_log_format_cluster() to use the stats_cluster_foreach_counter() API
stats: merge with stats-cluster
stats: merge with stats-registry
foo: bar