Dev app dns misc

Some cherry picks from https://github.com/inliniac/suricata/pull/754

- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/127
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/48