profiling: add pcap logger profiling

Tracks: file open, file close, file rotate (which includes open and
close), file write and open handles.

Open handles measures the cost of open the libpcap handles.
log-pcap code cleanups

Code cleanups to make functions static.
Update log-pcap.h, add license

Clean up log-pcap.h and add the OISF license header.
log-pcap: improve profiling

Add profiling to a logfile. Default is $log_dir/pcaplog_stats.log

The counters for open, close, rotate, write and handles are written
to it, as well as:
- total bytes written
- cost per MiB
- cost per GiB

Option is disabled by default.
log-pcap: lock profiling

Add lock profiling to pcap logging profiling.
log-pcap: multi mode yaml parsing

In preparation of the multi file mode, add 'multi' as a value to
the mode.
pcap-log: introduce PcapLogThreadData

PcapLog uses the global data structure PcapLogData as thread data
as well. This is possible because all operations on it are locked.

This patch introduces PcapLogThreadData. It contains a pointer to
the PcapLogData. Currently to the global instance, but in the future
it may hold a thread-local instance of PcapLogData.
pcap-log: implement multi mode

This patch implements a new mode in pcap-logging: 'multi'. It stores
a pcap file per logger thread, instead of just one file globally.

This removes lock contention, so it brings a lot more performance.

The trade off is that there are now mulitple files where there would
be one before.

Files have a thread id added to their name: base_name.tid.ts, so by
we have something like: "log.pcap.20057.1254500095".
pcap-log: performance optimizations

This patch adds a field 'is_private' to PcapLogData, so that the
using thread knows if it needs to lock access to it or not.

Reshuffle PcapLogData to roughly match order of access.
pcap-log: support dynamic file names in multi

When using multi mode, the filename can use a few variables:

%n -- thread number, where the 1st thread has 1, and it increments
%i -- thread id (system thread id, similar to pid)
%t -- timestamp, where seconds or seconds+usecs depends on
      the ts-format option.

Example:
filename: filename: pcaps/%n/pcap.%t
This will translate to: pcaps/3/pcap.1256792217 for the 3rd thread.

Note that while it's possible to use directories, they won't be
created. So make sure they exist.
pcap log: document multi option

Add yaml documentation for new 'multi' option.