Fix decode tests calling PACKET_DO_RECYCLE instead of PACKET_RECYCLE
packet recycle: split macro

Split PACKET_RECYCLE into 2 parts. One part for cleanup to do before a
packet is returned to the pool, the other after it's retrieved from
the pool.
packet recycle: do most clean up on packet reuse

Call PACKET_RELEASE_REFS from PacketPoolGetPacket() so that
we only access the large packet structure just before actually
using it. Should give better cache behaviour.
packet recycle: remove mutex destroy/init

This was necessary earlier when there was a memset involved.
packet pool: fix ext_pkt cleaning

The field ext_pkt was cleaned before calling the release function.
The result was that IPS mode such as the one of AF_PACKET were not
working anymore because they were not able to send the data which
were initially pointed by ext_pkt.

This patch moves the ext_pkt cleaning to the cleaning macro. This
ensures that the cleaning is done for allocated and pool packets.
Optimize Packet Ext data freeing

Move the logic of PacketFreeExtData into a macro 'PACKET_FREE_EXTDATA'.
It was called for each packet.
Simple code fixes
- Removed unnecessary assignment of the data field
- Removed else condition (same function called for IPv4 and IPV6)
- Fixed constants to be a power of two (used in bitwise operations)
Fix compiler warning about uninitialized variable in mpipe.
output-streaming: a Log API for streaming data

This patch adds a new Log API for streaming data such as TCP reassembled
data and HTTP body data. It could also replace Filedata API.

Each time a new chunk of data is available, the callback will be called.
output-streaming: StreamIterator

StreamIterator implementation for iterating over ACKed segments.

Flag each segment as logged when the log function has been called for it.

Set a 'OPEN' flag for the first segment in both directions.

Set a 'CLOSE' flag when the stream ends. If the last segment was already
logged, a empty CLOSE call is performed with NULL data.
streaming logger: support Http Body logging

Add an argument to the registration to indicate which iterator
needs to be used: Stream or HttpBody

Add HttpBody Iterator, calling the logger(s) for each Http body chunk.
tcp-data: new streaming logger

tcp-data logs out reassembled stream data in a streaming fashion.

Records type to log into different directories.
tcp-data-log: file and dir logging modes

Add a file logging mode, which logs all the data into a single log file.

Also, make the directory logging more configurable.
streaming-loggers: add configuration

Add a (disabled by default) config to the yaml
streaming: pass tx_id to logger

This way we can distinguish between various tx' in the logger.
output: add submodules list to OutputCtx

Add a list to the OutputCtx that can contain OutputModule structures.
This will be used by a 'parent' module to register submodules directly.
output-lua: display warning if no lua support

Display a warning that the lua module is not available if we're
not compiled against lua(jit).
output-lua: support submodules

Use the OutputCtx::submodules list to register additional log modules.
Currently this is hardcoded to the 'lua' module.
output: Lua HTTP log initial implementation

Initial version of a HTTP LUA logger. Execute lua scripts from the
Tx-log API.
output-lua: new file for common functions

Add output-lua-common.[ch] to store functions common to various parts
of the lua output framework.