TCP: proto detect and midstream v1.2

Fixes for midstream and cutoff for proto detect.

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/266
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/185