Dirac functional determinants in terms of the eta invariant and the noncommutative residue