Effects of madelung potentials at surfaces of ZnO on photoemission spectra and work functions