Assessment of density functional theory for iron(II) molecules across the spin-crossover transition