Investigation on the structural, optical, morphological and magnetic properties of undoped and Cd doped CuO nanoflakes