The mode competition, instability, and second harmonic generation in dual-frequency InGaAs/GaAs/InGaP lasers