Preparation and characterization of sol–gel derived carbon composite ceramic electrodes: electrochemical and XANES study of nitrite reduction