Napatech 3GD Support

For use with Network Cards from Napatech utilizing the 3GD driver/api.

    - Implemented a new run mode in runmode-napatech-3gd.*
    - Implemented capture/decode threads in source-napatech-3gd.*
    - Integrated the new run mode and source into the build infrastructure.
    - Added some default values to suricata.yaml.in for napatech3gd

    New configure switches
    --enabled-napatech-3gd : Turns on the NT 3GD support
    --with-napatech-3gd-includes : The directory containing the NT 3GD header files
    --with-napatech-3gd-libraries : The directory containing the NT 3GD libraries to link against.

    New CLI switch
    --napatech-3gd : Uses the Napatech 3GD run mode

    Notes:
    - napatech3gd.streams in the yaml file must equal the number of streams the Napatech 3GD driver is set to use.
           (Configured in ntservice.ini by setting HostBuffersRx and using NTPL to assign the host buffers to streams)
    - tested with 1 Gbps sustained traffic

Signed-off-by: Matt Keeler <mk@npulsetech.com>
Change some uintmax_t vars to intmax_t

There were some compilation errors after pulling from the main repo and this fixes it.

Signed-off-by: Matt Keeler <mk@npulsetech.com>
Fixed compilation error
libhtp: don't use internal iterator

It violates thread safety. #601.

Suricata assures thread safety on the flow level for HTTP tracking. Part of the flow is (in case of HTTP) libhtp's htp_connp_t state. At startup the libhtp glue layer, app-layer-htp initializes as many htp_cfg_t instances as there are libhtp server configurations in the yaml. At HTTP session start, we look up the proper htp_cfg_t based on the server ip and pass it to htp_connp_create.  A ptr to the relevant htp_cfg_t is part of the htp_connp_t. The htp_cfg_t contains "hooks". The are registered based on yaml config at init time.

The hooks have lists of type list_t. The list is run with a built in iterator. The iterator is reset at the start of each "hook_run_all". Since multiple flows share the same htp_cfg_t flow A can reset the iterator while flow B is using it. The flow lock has no effect as flows share the htp_cfg_t.

This has been observed in real traffic. hook_response_body_data was run on the same data multiple times, leading to corrupt extracted files.
stream: add option to match on overlapping data

Set event on overlapping data segments that have different data.

Add stream-events option stream-event:reassembly_overlap_different_data and
add an example rule.

Issue 603.
stream: don't reject RST as response to SYN because of ACK
stream: go from FIN_WAIT_1 to CLOSING on simultaneous close.
stream: handle retransmission of lost data packet on TIME_WAIT state
stream: ignore ack value if ack flag is not set. Add stream.pkt_broken_ack event for when ack value is not 0 and ack flag not set.
stream: detect keep-alive packets so we don't consider those invalid
stream: don't flag zero window probe packets as out of window. Bug #604.
stream: detect retransmissions on closewait and finwait2 states
stream: disable retransmission packet before last ack sig as it is fairly common in regular traffic
stream: accept ack with next_seq + 1 on last_ack state
stream: detect retransmissions on timewait state
stream: fix retransmission on closewait being considered out of window
stream: change how retransmissions are handled and detected.
update client/server/http_header to use a different form of
buffering/buffer_retrieval.

Now it happens per tx, based on tx id.  Also notice a perf improvement with
this.
Engine cleanup.  Remove all old engine inspection and mpm functions.
Change all inspect callbacks to accept TV and a tx_id param.