Scientists discover how oxygen loss saps a lithium-ion batte