Redmine#4848: fix peers, peerleader, and peerleaders functions and add tests
Merge pull request #1604 from tzz/redmine4848-peers

Redmine#4848: fix peers, peerleader, and peerleaders functions and add tests