Optical and electrical properties of Ti-doped ZnO films: observation of semiconductor–metal transition