Fundamentals and applications of near infrared spectroscopy in spectroelectrochemistry