Local and average structure of Mn- and La-substituted BiFeO3