Electron Paramagnetic Resonance Studies of Photodegraded Organic Photovoltaics and Tunable Perovskite-Based Optical Sensing