First-Principles Investigation of the Stability of the Oxygen Framework of Li-Rich Battery Cathodes