Returns a sample from the geometric distribution with probability p. I.e., it returns the number of flips it takes until a possibly biased coin (using flip) comes up heads.
p