Phase homogeneity and stability in undoped and Mn doped LiFePO4