Stability analyses of deterministic and stochastic SEIRI epidemic models with nonlinear incidence rates and distributed delay