Electron transfer and spin transition in metal-hexacyanoferrates driven by anatase TiO2: electronic and structural order effects