Only update mPipe stats occasionally around the packet loop.

Check for termination or stats update only once every 10,000 times
around the mPipe packet processing loop, to reduce locking.
icmpv6: Fix Coverity warnings on ND_* types

This patch fixes:
** CID 1187544:  Missing break in switch  (MISSING_BREAK)
/src/decode-icmpv6.c: 268 in DecodeICMPV6()

** CID 1187545:  Missing break in switch  (MISSING_BREAK)
/src/decode-icmpv6.c: 270 in DecodeICMPV6()

** CID 1187546:  Missing break in switch  (MISSING_BREAK)
/src/decode-icmpv6.c: 272 in DecodeICMPV6()

** CID 1187547:  Missing break in switch  (MISSING_BREAK)
/src/decode-icmpv6.c: 274 in DecodeICMPV6()

It duplicates the logic instead of adding 'fall through' statements
as the debug statements were wrong and confusing. For ND_REDIRECT
all 5 ND_* types would have been printed.
commandline parsing: check optarg ptr before using it

Fixes:
** CID 1075221:  Dereference after null check  (FORWARD_NULL)
/src/suricata.c: 1344 in ParseCommandLine()

The reason it gave this warning is that in other paths using optarg
there was a check, so the checker assumed optarg can be NULL.
stream-tcp: fix error handling in segment pool

When TcpSegmentPoolInit fails (e.g. because of a too low memcap),
it would free the segment. However, the segment memory is managed
by the Pool API, which would also free the same memory location.
This patch fixes that.

Also, memset the structure before any checks are done, as the segment
memory is passed to TcpSegmentPoolCleanup in case of error as well.

Bug #1108
stream-tcp: proper error if segment pool init fails

Until now a PoolInit failure for the segment pools would result in
an abort() through BUG_ON(). This patch adds a proper error message,
then exits.

Bug #1108.