Add rand-weighted-selection.

Add a function that, given interleaving weights and values, where the
weights sum to 1, randomly selects from among the values according to
the weights.
Merge pull request #50 from aperiodic/rand-weighted-selection

Add rand-weighted-selection.