Fault-tolerant switches for photonic networks