Generates gamma random deviates (reject method)
Algorithm for A >= 1 is Best's rejection algorithm XG Adapted from L. Devroye, "Non-uniform random variate generation", Springer-Verlag, New York, 1986, p. 410.
Algorithm for A < 1 is rejection algorithm GS from Ahrens, J.H. and Dieter, U. Computer methods for sampling from gamma, beta, Poisson and binomial distributions. Computing, 12 (1974), 223 - 246. Adapted from Netlib Fortran routine.