Time-reversal-invariant topological superconductivity induced by repulsive interactions in quantum wires