cppcheck issues v0

Part of https://redmine.openinfosecfoundation.org/issues/1046

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/275
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/193