Remove the old include support.
stream: no longer process STREAM_GAP smsgs

StreamSmgs are used for raw stream reassembly only. They could also
be used to tell the rest of the engine about sequence gaps. This was
a left over from the older implementation, where the app layer used
the smsgs as well.
stream: remove unused gap structure from StreamMsg.
stream msg: remove structure
stream: pass TcpSession to StreamTcpReassembleProcessAppLayer

Preparation for removing flow pointer from StreamMsg. Instead of
getting the ssn indirectly through StreamMsg->flow, we pass it
directly as all callers have it already.
stream: remove flow reference from StreamMsg

StreamMsg' flow reference was used mostly to make sure a flow would
not get removed from the hash before inspection. For this it needed
to reference the flow use_cnt reference counter. Nowadays we have
more advanced flow timeout handling. This will make sure that if
there still are pending smsgs' in a flow, these will still be
processed.
stream: remove per thread queue for stream msgs

StreamMsgs would be stored in a per thread queue before being
attached to the tcp ssn. This is unnecessary, so this patch
removes this queue and puts the smsgs into the ssn directly.

Large patch as it affects a lot of tests.
stream: remove flags from StreamMsg
stream: increase max StreamMsg data

Increase from 4024 bytes to 4072 to make the whole structure
4096 again.
stream: don't send empty streammsg at stream end

No longer send an empty StreamMsg through the engine on stream end,
the messages were ignored anyway.
Clean up TX clean up

In AppLayerTransactionsCleanup instead of figuring out 'done' tx id's
itself, now call AppLayerTransactionGetActive for both directions to
figure out the completed TX id's.
app-layer: configurable GetActiveTxId function

In preparation of a patchset that will allow for disabling the detect
module, this patch introduces a way to register a function for getting
the lowest active tx id. This is used by the app layer for cleaning up
transactions that already fully inspected, and by the flow timeout code
to determine if a flow is fully inspected and logged at timeout.

The registration function RegisterAppLayerGetActiveTxIdFunc allows for
registration of a custom function of type:
  uint64_t (*GetActiveTxIdFunc)(Flow *f, uint8_t flags);

If no function is called, AppLayerTransactionGetActiveDetectLog is used,
which implements the existing behaviour of considering both the
inspect_id's and the log_id.
counters: fix 2 scan-build warnings

counters.c:1069:13: warning: Potential leak of memory pointed to by 'temp'
            SCMutexUnlock(&sc_perf_op_ctx->pctmi_lock);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./threads.h:121:28: note: expanded from macro 'SCMutexUnlock'
                           ^~~~~~~~~~~~~~~~~~~~
counters.c:1156:16: warning: Potential leak of memory pointed to by 'pca'
        return NULL;
               ^~~~
/usr/include/clang/3.3/include/stddef.h:77:24: note: expanded from macro 'NULL'
                       ^
2 warnings generated.
Fix PmqSetup() argument removal in ac-tile MPM unit tests.

Needed to remove the second argument from all the calls, which was always 0
and was removed in other tests in a previous checkin.
Remove GCC -no-strict-aliasing compiler flag.

GCC typically generates better code without the -no-strict-aliasing flag.
It is only required if code makes assumptiosn that break strict aliasing.
The unit tests pass on x86 and Tile without the flag.
app-layer: API calls to check for TX aware proto

Introduce AppLayerParserProtocolIsTxAware which returns 1 if protocol
is Tx aware, 0 if not.
dns log: cleanups
memcmp: convert all pointer arguments to be const pointers, like memcmp itself uses.
DNS: don't store duplicate queries

When an exact duplicate DNS query is received, don't store it in the
tx.
dns: tag each tx we get a reply for as replied

Also, detect and print when server says recursion is desired.