This implement an utility that can select a peer with a probability depending on its score. The higher the score, the more likely that peer is to be chosen.
Obviously, this is not usable as this because it exposes index from internal datastructures, but this much allows to check the algorithm are correct and constitue a useful unit of work.