Photoswitchable Molecular Units with Tunable Nonlinear Optical Activity: A Theoretical Investigation