Support logging operations to a file

This adds support for the null.log.filename option, which will write
most operations (connect, disconnect and query) into the specified
logfile.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Support returning an error on every Nth query

With the new null.error.query.nth option set, an error will be returned
for every Nth query.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>