Stability of polar ZnO surfaces studied by pair potential method and local energy density method