Defect chemistry and electrical characteristics of undoped and Mn-doped ZnO