Oxygen hole formation controls stability in LiNiO2 cathodes