Note that for $|a|=1$, we can write $a=e^{i\psi}$. Then, exploiting the $2\pi$-periodicity of the integrand, we have
$$\begin{align}
\int_{-\pi}^\pi \log|1-ae^{i\theta}|\,d\theta&=\int_{-\pi}^\pi \log|1-e^{i(\theta+\psi)}|\,d\theta\\\\
&=\int_{-\pi+\psi}^{\pi+\psi} \log|1-e^{i\theta}|\,d\theta\\\\
&=\int_0^{2\pi}\log|1-e^{i\theta}|\,d\theta
\end{align}$$
METHODOLOGY 1:
Note that we have $|1-e^{i\theta}|=\sqrt{2(1-\cos(\theta))}=2|\sin{\theta/2}|$. Now, we have
$$\int_0^{2\pi}\log|1-e^{i\theta}|\,d\theta=4\int_0^{\pi/2}\log(2\sin(\theta))\,d\theta=0$$
since $\int_0^{\pi/2}\log(\sin(\theta))\,d\theta=-\frac{\pi}{2}\log(2)$
METHODOLOGY 2:
Now, we cut the complex plane with a line from $(1,0)$ and extending along the positive real axis.
Note that $\log(1-z)$ is analytic within and on a closed contour $C$ defined by $z=e^{i\phi}$ for $\epsilon \le \phi \le 2\pi -\epsilon$, and $z=1+2\sin(\epsilon/2) e^{i\nu}$ for $\pi/2 + \gamma \le \nu \le 3\pi/2 -\gamma$, where $
\cos(\gamma)=\frac{\sin \epsilon}{\sqrt{2(1-\cos \epsilon)}}$ and $0 \le \gamma <2\pi$ on this branch of $\gamma$.
Then, from the residue theorem, we have
$$\int_C \frac{\log(1-z)}{z}dz=2\pi i \log(1-0)=0$$
which implies
$$\begin{align}
\int_C \frac{\log(1-z)}{z} dz&=\int_{\epsilon}^{2\pi-\epsilon} \log(1-e^{i\phi})i d\phi+\int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2) e^{i\nu})}{1+2\sin(\epsilon/2) e^{i\nu}}i2\sin(\epsilon/2) e^{i\nu}d\nu\\\\
&=i\int_{\epsilon}^{2\pi-\epsilon} \log(1-e^{i\phi}) d\phi+ i2\sin(\epsilon/2) \int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2)e^{i\nu})e^{i\nu}d\nu}{1+2\sin(\epsilon/2)e^{i\nu}} \\\\
&=i\int_{\epsilon}^{2\pi-\epsilon} \log|1-e^{i\phi}| d\phi -i \int_{\epsilon}^{2\pi-\epsilon} \arctan \left(\frac{\sin \phi}{1-\cos \phi}\right)d\phi \\\\
&+ i2\sin(\epsilon/2) \int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2)e^{i\nu})e^{i\nu}d\nu}{1+2\sin(\epsilon/2)e^{i\nu}} \\\\
&=0
\end{align}$$
As $\epsilon \to 0$ the first term on the RHS approaches $i$ times the integral of interest. The second term approaches zero since $\arctan(\frac{\sin \phi}{1-\cos \phi})$ is an odd, $2\pi$-periodic function of $\phi$ and the integration extends over the entire period. And the last term approaches $0$ since $x\log x \to 0$ as $x \to 0$. Thus, the integral of interest is zero!
First, we want to put an uppoer bound on the magnitude of the integral. Moving the absolute value inside is a good start to get rid of annoying phase terms:
$$
\left|iR\int_0^{\pi/4}e^{-R^2e^{2it}}e^{it}dt\right|\le R\int_0^{\pi/4}\left|e^{-R^2e^{2it}}e^{it}dt\right| = R\int_0^{\pi/4}e^{-R^2\cos(2t)}dt.
$$
Next, note that $\cos(2t) \ge 1 - 4t/\pi$ on this interval, which leads to
$$
R\int_0^{\pi/4}e^{-R^2\cos(2t)}dt \le R\int_0^{\pi/4}e^{-R^2(1-4t/\pi)}dt = \frac{\pi}{4R}\left(1-e^{-R^2}\right)\le \frac{\pi}{4R}.
$$
Putting these together we have
$$
\left|iR\int_0^{\pi/4}e^{-R^2e^{2it}}e^{it}dt\right|\le \frac{\pi}{4R}
$$
and thus the integral goes to zero as $R\rightarrow\infty$.
Best Answer
why don't you expand $$\frac{1}{z - a} = \frac{1}{z} \frac{1}{1 - a/z} = \frac{1}{z}\{1 + a/z + a^2/z^2 + \cdots \}$$ and $$\frac{1}{z - b} = -\frac{1}{b} \frac{1}{1 - z/b} = -\frac{1}{b}\{1 + z/b + z^2/b^2 + \cdots \}$$ and use the fact $\int_{|z| = r} z^n dz = 0$ for $n \neq - 1$ and $\int_{|z| = r} z^{-1} dz = 2\pi i.$