Simple and precise factorization of the Jarlskog invariant for neutrino oscillations in matter