Defect chemistry in alkali peroxides and superoxides