Effect of inelastic scattering on resonant and sequential tunneling in double barrier heterostructures