bytetest: fix debug messages not printing negative offset correctly
Unit-tests exposing a bug in byte_test, byte_jump and byte_extract.

Bug emanates from all the keywords being unable to handle negative offsets
when the inspection pointer is at the end of the buffer.
Fix the bug specified in the previous commit.

Bug emanates from byte_test, byte_jump and byte_extract keyword being
unable to handle negative offsets when the inspection pointer is at the
end of the buffer.
bytetest: add unittest showing missed detection

Tests recursive and relative negative byte_test matching.
discontinue matching on buffer if urilen returns a match failure.
Fix wrong casting of htp pointer.  Fixed it back to (HTPState *) inside
htp utility functions.
Fix magic unittets.

Fix segv, when magic_load() fails due to the non-availability of default
magic files.
action handling: define and use macros

The action field in Packet structure should not be accessed
directly as the tunneled packet needs to update the root packet
and not the initial packet.

This patch is fixing issue #819 where suricata was not able to
drop fragmented packets in AF_PACKET IPS mode. It also fixes
drop capability for tunneled packets.
action handling: use macro for test.

Use test macro instead of direct access to action field.

This patch has been obtained by using the following
spatch file:

  @@
  Packet *p;
  expression E;
  @@

  - p->action & E
  + TEST_PACKET_ACTION(p, E)
action handling: add test to avoid direct access

Direct access to the action field of Packet structure is not
allowed.
unix-socket: fix OSX build

MSG_NOSIGNAL is not defined on macOSX and SO_NOSIGPIPE is used
instead.
Import suri-graphite script

This patch import suri-graphite into suricata contrib directory.
This script reads counters from suricata unix socket and send them
to a Graphite graphing server.
Add one shot run option to suri-graphite.
update cuda API wrappers
Remove all cuda related code in the engine except for the cuda api wrappers
code refactoring. Call mpmprefilter slightly later than where it's called atm
pool now uses a queue kinda behaviour when getting/inserting data through poolbuckets.
We call packet and stream mpm as late as possible now. Won't affect the working of the engine.

The rationale behind this is, if we have pkt buffered to the gpu, we'd want
to delay processing the pkt as much as possible.
Version 1 of CudaBuffer API. Introduced to buffer data to the gpu.

This version allows async writes to a buffer by threads.  Allows only
sequential reads though.
Version 1 of AC Cuda.