Microstructure, optical and magnetic properties of TiO2/CuO nanocomposites synthesized by a two-step method