Cycle rooted spanning forest and the critical Ising model on the torus