Bug1130 v1.3

This is an updated version of PR #896.

It should fix the sign and unsigned comparison errors. It also improves the code by adding a function to hide the magical peerlists.turn == 0. Last modification is an updated commit message on the main commit.

Redmine ticket: https://redmine.openinfosecfoundation.org/issues/1130

PR builds:
- PR build: https://buildbot.suricata-ids.org/builders/regit/builds/123
- PR pcaps: https://buildbot.suricata-ids.org/builders/regit-pcap/builds/62