Leveraging P4 Programmable Switches for Resilient Operation and Design of Phasor Measurement Unit Networks