Rapid green synthesis of CuO nanoparticles and evaluation of its photocatalytic and electrochemical corrosion inhibition performance