Added probability-based random number generation.

The consumption quantity of pulses generated is now not purely random by
nature, but  has dependency on the probability-based frequency
distribution whose details have been documented in AmUtils.java