lua: Add support for setting global variables

This adds a global() option to the lua destination, where one can list
name-value pairs, which will be injected into the lua state upon
startup, shortly after the script is loaded. Currently, it supports only
strings and 32-bit integers. This fixes #23.

An usage example is included in the elasticsearch example.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge pull request #25 from algernon/f/lua/global-vars

lua: Add support for setting global variables
Preparations for syslog-ng-incubator 0.2.0

NEWS updated, and version in configure.ac bumped.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
configure.ac: Add a check for memrchr

While we're not using memrchr directly, the compat.h file we indirectly
include from syslog-ng does. To make things compile properly on certain
platforms, like FreeBSD, we need to explicitly check for this too.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
configure.ac: Improved Lua detection

Look for lua-5.2 and lua-5.1 too, as the pkg-config module is called
like that on FreeBSD, for example.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
lua: Do not try to inject globals when they are not present.

Signed-off-by: Tusa Viktor <tusavik@gmail.com>
Merge pull request #28 from talien/fix/lua-missing-globals

lua: Do not try to inject globals when they are not present.
Preparations for syslog-ng-incubator 0.2.1

NEWS updated, and the version in configure.ac bumped.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
modules/getent: Implement a $(getent) template function

This implements most of the $(getent) template function, with the syntax
proposed in #26. $(getent hosts) is not implemented, and the rest aren't
all that portable, but for now, this will do.

Requested-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>