Variance reduction techniques for simulation with applications to stochastic networks