Bernoullirngbugfix

Fix Bernoulli RNG bug and add test case - was previously generating all 0s unless p==1 exactly.  Not entirely sure why boost::bernoulli_distribution\<int\> doesn't work - perhaps it typecasts p to an int, thereby truncating anything in [0,1) to 0?