Structural and chemical evolution in layered oxide cathodes of lithium-ion batteries revealed by synchrotron techniques