Retrodictive derivation of the radical-ion-pair master equation and Monte Carlo simulation with single-molecule quantum trajectories