Unix socket fix 2.0.1

This patchset fixes two problem related to unix socket.

I was not able to reproduce the crash related to bug 1217 but the analysis done in the ticket is correct and no crash seems to be introduced by the patch. Test of valgrind fix related to 1175 has been done.

Redmine tickets:
* https://redmine.openinfosecfoundation.org/issues/1175
* https://redmine.openinfosecfoundation.org/issues/1217

PR builds:
- PR build: https://buildbot.suricata-ids.org/builders/regit/builds/133
- PR pcaps: https://buildbot.suricata-ids.org/builders/regit-pcap/builds/72