Fixes v3

Includes https://github.com/inliniac/suricata/pull/858, valgrind fixes.

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/204
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/124