Introduce packet logging output API

This patch introduces a new API for outputs that log based on the
packet, such as alert outputs. In converts fast-log to the new API.

The API gets rid of the concept of each logger being a thread module,
but instead there is one thread module that runs all packet loggers.
Through the registration function OutputRegisterPacketModule a log
module can register itself to be considered for each packet.

Each logger registers itself to this new API with 2 functions and the
OutputCtx object that was already used in the old implementation.
The function pointers are:

LogFunc:       the log function

ConditionFunc: this function is called before the LogFunc and only
               if this returns TRUE the LogFunc is called.

For a simple alert logger like fast-log, the condition function will
simply return TRUE if p->alerts.cnt > 0.
Packet logging API: convert unified2

Convert unified2 alert to new logging API.
Introduce TX logging API

This patch introduces a new API for logging transactions from
tx-aware app layer protocols. It runs all the registered loggers
from a single thread module. This thread module takes care of the
transaction handling and flow locking. The logger just gets a
transaction to log out.

All loggers for a protocol will be run at the same time, so there
will not be any timing differences.

Loggers will no longer act as Thread Modules in the strictest sense.
The Func is NULL, and SetupOuputs no longer attaches them to the
thread module chain individually. Instead, after registering through
OutputRegisterTxModule, the setup data is used in the single logging
module.

The logger (LogFunc) is called for each transaction once, at the end
of the transaction.
TX logging API: convert HTTP log

Convert the HTTP log to the new TX logging API.
Convert log-drop to packet logger api.
dns: convert dns logger to TX logger API

Make sure to use the new logger TX API. For this the transaction
handling was improved as well.
log-tls: clean ups

Make all functions static. Remove separate ipv4 and ipv6 registration
functions. Move register function to the bottom so that we no longer
need function prototype declarations.
log-tls: convert to packet logger API

This patch converts log-tls to use the packet logger API. The packet
logger API was choosen as the TLS parser is not transaction aware.

To make sure the state is only logged once, the flag
SSL_AL_FLAG_STATE_LOGGED was added to the parser. This flag is checked
by the condition function, and set at the end of the Logger function.
alert-debug log cleanups

Make all funcs but registration static.
Remove stale registation prototypes.
Move registation func to the bottom.
alert-debuglog: port to packet logger api

Convert AlertDebugLog to Packet logger API. Convert packet args to
const.
alert-debuglog: minor cleanups

Clean up log functions after packet logger conversion. No more
PacketQueue arguments.
alert-pcapinfo: clean up

Make functions static.
Move registration to the bottom.
alert-pcapinfo: convert to packet logger API

Convert pcap-info to use the packet logger API.
alert-syslog: cleanup

Remove separate ipv4 and ipv6 registration functions.
Make all functions static.
Move registration function to the bottom.
Simplify OS_WIN32 wrappers usage.
alert-syslog: convert to packet logger API

Convert Syslog alert logger to packet logger API.
prelude: fix configure and cleanup

Fixes configure enabling of prelude. CFLAGS is reset, so the previous
adding of -DPRELUDE was nixed. Using AC_DEFINE now.

Cleanups:
- make functions static
- simplify handling of no prelude support
- move registration to the bottom
prelude: convert to packet logger API

Convert prelude logger to use the packet logger API.
log-file: cleanups

Make all functions static.
Move registration to the bottom.
Introduce 'file' logging API

This patch introduces a new logging API for logging extracted file info.
It allows for registration of a callback that is called once per file:
when it's considered 'closed'.

Users of this API register their Log Function through:
    OutputRegisterFileModule()

The API uses a magic settings globally. This might be changed later.
log-file: convert to file-logger API

Use file logger API.

Also, check if the protocol is HTTP before getting the HTTP
fields.