Change the generation of a Bernoulli generated random variable to also include optional values to return.

The subroutine that returns samples from a Bernoulli random variable has been changed. It now has an optional parameter that can be used to specify alternate values representing success or failure.