Optically monitoring the electrochemical stability of single metallic nanocrystals in complex electrolyte environments