Onset of charge-density-wave conduction: Switching and hysteresis in Nb Se 3