Flexible-waveguide multipole fiber-optic switch