Local electronic structure, work function, and line defect dynamics of ultrathin epitaxial ZnO layers on a Ag(1 1 1) surface