State4: State-preserving Reconfiguration of P4-programmable Switches