The role of diffusion processes in the self-discharge of electrochemical capacitors