Stability of pulse emission and enhancement of intracavity second-harmonic generation in self-mode-locked quantum cascade lasers