Add support for RNG injection

In the CodeCombat project, we replace `Math.random` with a deterministic pseudoRNG. This patch would allow us to get deterministic behavior out of `_.random` after we do the replacement.

Original issue here: https://github.com/codecombat/codecombat/issues/1210.