Misc

Contains:
- https://github.com/inliniac/suricata/pull/956, with a fix
- More bug #1101 fixes.
- https://github.com/inliniac/suricata/pull/958 (rebased)

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/293
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/211