Electronic Structure of Impurities in Ferromagnetic Iron. II. 3d and 4d Impurities