Defects and dopants in zinc oxide: a study of the optoelectronic properties of thin films prepared by spray pyrolysis