Stochastic flux analysis of chemical reaction networks