All-optical polarization and amplitude modulation of second-harmonic generation in atomically thin semiconductors