Time-dependent rational extensions of the parametric oscillator: quantum invariants and the factorization method