Fix live reload

Fix memsets clearing out of bounds memory on live reload, causing
crashes and corrupted backtraces.

Bug #1128. https://redmine.openinfosecfoundation.org/issues/1128

Rebase of https://github.com/inliniac/suricata/pull/882

Prscript:
- PR build: https://buildbot.suricata-ids.org/builders/inliniac/builds/226
- PR pcaps: https://buildbot.suricata-ids.org/builders/inliniac-pcap/builds/146