A Smart Sensing Node for Pervasive Water Quality Monitoring with Anti-Fouling Self-Diagnostics