Using scanning electrochemical microscopy to determine the doping level and the flatband potential of boron-doped diamond electrodes.