app layer cleanups v0.7

Changes since https://github.com/inliniac/suricata/pull/782:
- rebase against current master

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/155
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/75