Comparative analysis of the changes in local Ni/Mn environment in lithium–nickel–manganese oxides with layered and spinel structure during electrochemical extraction and reinsertion of lithium