Dipolar and charge transfer effects on the atomic stabilization of ZnO polar surfaces