XANES study of the oxidation state and coordination environment of manganese, chromium and cobalt in spinel type materials