Not sure why none of the answers mention this approach, but you can just take the derivative with respect to $r$:
\begin{align}
I'(r) &= \int_0^{2\pi}\frac{d}{dr}\left(\frac{\cos t - r}{1 - 2r\cos t + r^2}\right)\,dt\\
&= \int_0^{2\pi} \frac{(r^2-1)-2r\cos t + 2\cos^2t}{(1 - 2r\cos t + r^2)^2} \\
&= \frac1{i}\int_{|z|=1} \frac{(r^2-1)-r(z+z^{-1}) + \frac12(z+z^{-1})^2}{(1 - r(z+z^{-1}) + r^2)^2}\cdot\frac{dz}{z}\\
&= \frac1{i}\int_{|z|=1} \frac{z^4-2r z^3+2r^2z^2-2rz+1}{(r^2+1)z(z-r)^2\left(z-\frac1r\right)^2}\,dz\\
\end{align}
Since $r \in [0,1\rangle$, the relevant residues are $$\operatorname{Res}(f,0) = \frac1{2r^2}$$
$$\operatorname{Res}(f,r) = -\frac1{2r^2}$$
so $I'(r) = 0$ for $r \in [0,1\rangle$.
We conclude that $I$ is constant on $[0,1\rangle$. Hence $$I(r)=I(0) = \int_0^{2\pi}\cos t\,dt = 0$$