R-leaping: Accelerating the stochastic simulation algorithm by reaction leaps