Polarization grating-based wavelength selective switches