Solid state pH and chloride sensor with microfluidic reference electrode