WeightedItemsSelector implementation and basic tests

```scala
private val (distributedMap, total) = weightedItems.foldLeft((new java.util.TreeMap[Double, T], 0.0)) {
  case ((map, tot), (weight, item)) =>
    map.put(tot + weight, item)
    (map, tot + weight)
}
```