suricatasc: implement autoreconnect

Implement a basic autoreconnect support. It tries to reconnect once
when connection has been lost. If it fails, it discards the command
and try again to connect at next command.

PR builds:
- PR build: https://buildbot.openinfosecfoundation.org/builders/regit/builds/19
- PR pcaps: https://buildbot.openinfosecfoundation.org/builders/regit-pcap/builds/17