tls: fix problem with tls.store keyword

Pierre Chifflier pointed out that a rule like:
 alert tls any any -> any any (msg:"TLS store"; tls.issuerdn:!"C=FR"; tls.store;)
was alerting but not storing the certificate. If the filter was
removed:
 alert tls any any -> any any (msg:"TLS store"; tls.store;)
then tls.store is working as expected.

This was linked with fact that logging is only done once for a SSL
state. So without filter, once we have the info we can log and we
run the storage. But when there is a filter, we log and then there
is a filter analysis and alerting. And as logging as already be done
we don't enter in the logging function and there is no storage.

This patch forces the entrance in the log function when there is a
request for TLS storage. And it adds an exit in the logging function
to only do the storage part if the TLS state has already being logged.
Update Changelog for 2.0 release
Fix app-layer-protocol FP on multi TX flow

In case of multiple transactions, the stored AMATCH list would not have
been reset, but it would still be reconsidered. Even though none would
match, the engine would still conclude that the rule matched.
detect state: remove alproto check for AMATCH

Not all AMATCHes set a alproto.
detect state: fix indent

AMATCH block was indented too far.
TLS: register patterns for tls-alerts

Register patterns for when server has an alert as the first message.
icmpv6: add multicast types

Only add them to check if the code is 0 and to make sure the default
case doesn't set an 'unknown type' event.
ipv6: add support for PAD1

Support PAD1 in IPv6 HOP options header and DST options header.
tls: no event on 'new session ticket' in handshake

Don't set an event on encountering a 'new session ticket' (4) record
in the TLS handshake.
Change configure to allow statically linking libpcre.

Statically linking libpcre requires using -lpthread, which is added
when building Suricata, but not while checking for libpcre in configure.
json: somewhere along the way  IP/port pairs had gotten swapped in
http and ssh eve logs
Force pidfile creation of --pidfile.

A pidfile can be useful when not in daemon mode, for example
when running under a process supervisor.
app-layer: cleanups

Clean up AppLayerParserThreadCtxAlloc and AppLayerParserThreadCtxFree.
Both used confusing variables in loops, with the wrong types.
decode: introduce DecodeThreadVarsFree

As a mirror of DecodeThreadVarsAlloc, DecodeThreadVarsFree is used
to free the memory that DecodeThreadVarsAlloc alloc'd, including
AppLayer storage.
pcap-file: clean up decode thread local storage

Clean up the thread local data the decode portion of pcap-file use.

Bug #978.
drmemory: remove bug 978 suppression

Bug is fixed, so suppression is no longer needed.

Bug #978.
af-packet: clean up decode thread local storage

Clean up the thread local data of the decode part of afpacket.

Bug #978
nfq: clean up decode thread local storage

Clean up the thread local data the decode portion of nfq uses.

Bug #978
pfring: clean up decode thread local storage

Clean up the thread local data the decode portion of pfring uses.

Bug #978
pcap: clean up decode thread local storage

Clean up the thread local data the decode portion of pcap uses.

Bug #978