Influence of particle size on the electrocatalytic activity and optical properties of NiO nanoparticles