Fix pcap packet acquisition methods

Fix pcap packet acquisition methods passing 0 to pcap_dispatch.
Previously they passed the packet pool size, but the packet_q_len
variable was now hardcoded at 0.

This patch sets packet_q_len to 64. If packet pool is empty, we fall
back to direct alloc. As the pcap_dispatch function is only called
when packet pool is not empty, we alloc at most 63 packets.
Fix packet pool pending stack adds

Add packets after the first as the list/stack head as well.
Remove unused variables
Fix engine getting stuck because of optimizations

At -O1+ in both Gcc and Clang, PacketPoolWait would optimize the
wait loop in the wrong way. Adding a compiler barrier to prevent
this optimization issue.
Add packet and payload logging to JSON alert output
Fixed stream handling Fixed some coding style issues
Add ability to encode payload in Base64
Changed variable name when dumping single packet
Changed attribute name for printable payload
Fixed variables names in suricata.yaml.in Changed logging logic - now it's possible to enable different payload dumping modes separately Fixed bug in dumping packet without stream segments Fixed indents
Fix handling filetype for eve log
Fix possible crash when logfile descriptor is invalid
Fixed memory leak
Fix eve 'filetype' parsing

Now that we use 'filetype' instead of 'type', we should also
use 'regular' instead of 'file'.

Added fallback to make sure we stay compatible to old configs.
flow: new flow queue: flow_recycle_q

This queue will be used by the FlowManager to pass timed out flows
to another thread that will do the actual cleanup.
flow: introduce FlowRecycler stub

FlowRecycler thread stub. Start/stop code.
flow: move flow cleanup to new 'recycler'

Move Flow clean up from the flow manager to the new flow recycler.
flow recycler: shutdown

Only shut down when all flows in the recycle queue have been processed.
flow recycler: unix socket support

Support starting and shutting down the flow recycler thread in the
unix socket runmode.
flow: output api stub

Basic output API for flow logging.