json: add dot-notation evaluation

This patch adds an implementation for JSON dot notation evaluation. It
can parse a JavaScript dot-notation form and evaluate it on a given
JSON object.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
json: add extract-prefix() option to json-parser

This option adds a new option to json-parser() that instructs the parser
to only extract JSON members from a specific subtree of the incoming object.

Example:
  json-parser(extract-prefix("foo.bar[5]"));

Assuming that the incoming object is named msg, this is equivalent to the
following javascript code:

  msg.foo.bar[5]

The resulting expression must be a JSON object, so that syslog-ng can
extract its members into LogMessage name-value pairs.

This also works when the top-level object is an array, as extract-prefix()
allows the use of an array index at the first indirection level, e.g.

  json-parser(extract-prefix("[5]"));

which translates to: msg[5]

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
nodejs: add nodejs() source driver

This patch adds an SCL macro that configures syslog-ng to accept messages
from node applications which use winston as their logging API.

Here's how to configure the Logger in the node application:

$ npm install winston winston-nssocket

==== logapp.js ====
var winston = require('winston')
var nssocket = require('winston-nssocket').Nssocket

winston.add(nssocket, {
  host: 'localhost',
    port: 9003
});

winston.log('info', 'Hello syslog-ng!', {'meta': 'info'} );

=================

And here's how to configure the syslog-ng side:

# make sure that scl is included
@include "scl.conf"
source s_network {
	nodejs();
}:

The nodejs() driver uses port 9003 by default, but you can
change the bind parameters with the port() and localip() parameters.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>