random-sampling: add module to compute weighted-random sampling from lists of events