Microstructure and optoelectronic properties of titanium-doped ZnO thin films prepared by magnetron sputtering