Density functional theory study of stoichiometric and nonstoichiometric ZnO grain boundaries