Stability Analysis of Quantum-Cascade Lasers with Intracavity Nonlinearity and Group-Velocity Dispersion