Fix issue 11597 - Speed up std.random.dice

This changes the way that diceImpl works by allocating and producing a
cumulative sum array and then binary searching on it to find where the
uniformly chosen point lies on the array. This slightly improves
performance and will allow dice to perform better when the number of
proportions is large.

Additionally, this change allows for a relaxing of the range
constraint. The new way does not need .save() on proportions, so it is
possible to use an InputRange. Therefore, the new constraint reflects
this capability.