stream/async: fix session setup issues

For these 2 cases:

1. Missing SYN:
-> syn <= missing
<- syn/ack
-> ack
-> data

2. Missing SYN and 3whs ACK:
-> syn <= missing
<- syn/ack
-> ack <= missing
-> data

Fix session pickup. The next_win settings weren't correctly set, so that
packets were rejected.

Bug 1190.
stream/async: improve handling of syn/ack pickup

If we picked up the ssn with a syn/ack, we don't need to make more
assumptions about sack and wscale after that.
Make suricata_ctl_flags be volatile

The global variable suricata_ctl_flags needs to volatile, otherwise the
compiler might not cause the variable to be read every time because it
doesn't know other threads might write the variable.

This was causing Suricata to not exit under some conditions.
SMTP MIME Email Message decoder
smtp-mime: add server reply codes returned from outlook server
eve-log: SMTP JSON logger
smtp layer: fix unittests

Synchronize test 14 with the new application layer API and improve
debug messages.
app-layer-smtp: fix Test14.

Was running one byte past end of buffer.
Declare Unit Test 14's data as static.
mime-decode: don't scan attachment's data for URLs.
move event pointer lookup inside extract_urls and protect pointer walk.
eve-log: catch and log URLs in basic text emails without mime encapsulation.
         expand pointer walk protection.
smtp: turn on smtp mime decoding and enable smtp eve logging.
PR review comment.  Use protocol to discern log type.
app-layer-smtp: move old smtp-mime section in suricata.yaml into
app-layer-protocols.smtp.mine section and update code to accomodate.
mime-decode: remove "comparison between signed and unsigned integer expressions"
warnings
mime-decode: fix minor memory leak if Mime parser initialization were to fail.
mime-decode: clean up after MimeDecParseFullMsgTest01.
smtp-mime: preinitialize base64 decoder space

Preinit with zeros.
mime: refactor buffer use

Turn all buffers into uint8_t (from char) and no longer use the
string functions like strncpy/strncasecmp on them.

Store url and field names as lowercase, and also search/compare
them as lowercase. This allows us to use SCMemcmp.
Fix compiler warning
output smtp: clean up memory at shutdown