Thread Registration API for ID's

Create thread registration and unregistration API for assigning unique
thread id's.

Threadvars is static even if a thread restarts, so we can do the
registration before the threads start.

A thread is unregistered when the ThreadVars are freed.
Give easy access for thread stream packet queue

Access it from ThreadVars. This allows for easy injection of packets
into the stream engine.
Define FlowThreadId and add it to the flow

16 bits id should be enough for threads for a while.
Introduce Flow timeout injection api

Add function TmThreadsInjectPacketById that is to be used to inject flow
timeout packets into the threads stream_pq queue.

TmThreadsInjectPacketById will also wake up listening threads if
applicable.

Packets are passed all packets together in an NULL terminated array
to reduce locking overhead.
Thread registration: id's start at 1

Start thread id's at 1, so that in flow's we can use 0 to indicate
a thread id hasn't been set in it yet.
Assign thread_id to flow on first packet stream engine
flow-timeout: use live threads

Use live threads. Disable old timeout code.
flow-time: use live threads at shutdown

Update pktacq loop to process flow timeouts in a running engine.

Add a new step to the shutdown phase of packet acquisition loop
threads (pktacqloop).

The shutdown code lets the pktacqloop break out of it's packet
acquisition loop. The thread then enters a flow timeout loop, where
it processes packets from it's tv->stream_pq queue until it's
empty _and_ the KILL flag is set.

Make sure receive threads are done before moving on to flow hash
cleanup (recycle all). Without this the flow recycler could start
it's unconditional hash clean up while detect threads are still
running on the flows.

Update unix socket to match live modes.
flow-time: disable remainder of the old timeout code

Disable registration code that was looking for threadvars
and slots as timeout handling is now done in a live engine.
stream: handle flow timeout stream end packets

Handle flow timeout packets in the stream engine. Previously the flow
timeout code would call reassembly code directly.
flow timeout: cleanup

Remove now unused old flow timeout code.
flow timeout: cleanups

Rename FlowForceReassemblyForFlowV2 to just FlowForceReassemblyForFlow
as there is no V1.
threading: lock TmThreadKillThreadsFamily
flow-timeout: use packet pool

Use packet pool for pseudo packets on flow timeout. Wait for a packet
if necessary.

For shutdown, alloc a new pool as the 'main()' thread calls this.