Returns a random integer number according to a geometric distribution p(i) = (1-p) * p^(i-1). p must satisfy 0 < p < 1.