Invariant factors, Wiener–Hopf factorization indices, and invariant factors at infinity of rational matrices