I/O-efficient iterative matrix inversion with photonic integrated circuits