In-Network PCA and Anomaly Detection