Polarization and wavelength selective switches