Ab initio study of lithium and sodium iron fluorophosphate cathodes for rechargeable batteries