You use an almost-keyhole contour, except that you indent both paths above and below the real axis with a small semicircle to avoid the pole at $z=1$:
In doing this, you end up with not $4$, but $8$ contour segments. I will avoid writing them all out by noting that the integrals over the outer circular arc and inner circular arc at the origin vanish in the limits of their radii going to $\infty$ and $0$, respectively. We are left with
$$\oint_C dz \frac{z^{-a}}{1-z} = \int_{\epsilon}^{1-\epsilon} dx \frac{x^{-a}}{1-x} + i \epsilon \int_{\pi}^0 d\phi\, e^{i \phi} \frac{(1+\epsilon e^{i \phi})^{-a}}{-\epsilon e^{i \phi}} + \int_{1+\epsilon}^{\infty} dx \frac{x^{-a}}{1-x} \\+e^{-i 2 \pi a} \int_{\infty}^{1+\epsilon} dx \frac{x^{-a}}{1-x} +e^{-i 2 \pi a} i \epsilon \int_{2 \pi}^{\pi} d\phi\, e^{i \phi} \frac{(1+\epsilon e^{i \phi})^{-a}}{-\epsilon e^{i \phi}} +e^{-i 2 \pi a} \int_{1-\epsilon}^{\epsilon} dx \frac{x^{-a}}{1-x} $$
Combining like terms, we get
$$\oint_C dz \frac{z^{-a}}{1-z} = \left ( 1-e^{-i 2 \pi a}\right ) PV\int_{0}^{\infty} dx \frac{x^{-a}}{1-x} + \left ( 1+e^{-i 2 \pi a}\right ) i \pi = 0$$
because of Cauchy's Theorem. $PV$ denotes the Cauchy principal value. After a little algebra, the result is
$$PV\int_{0}^{\infty} dx \frac{x^{-a}}{1-x} = -i \pi \frac{1+e^{-i 2 \pi a}}{1-e^{-i 2 \pi a}}=-\pi \cot{\pi a}$$
EXAMPLE
Let's check the result for $a=1/2$. This would imply that
$$PV \int _{0}^{\infty} dx \frac{1}{\sqrt{x} (1-x)} = 0$$
Consider
$$\begin{align}\underbrace{\int_0^{1-\epsilon} dx \frac{1}{\sqrt{x} (1-x)}}_{x=1/u} &= \int_{1/(1-\epsilon)}^{\infty} \frac{du}{u^2} \frac{\sqrt{u}}{1-(1/u)} \\ &= -\int_{1+\epsilon}^{\infty} du \frac{1}{\sqrt{u} (1-u)}\end{align}$$
Thus
$$\int_0^{1-\epsilon} dx \frac{1}{\sqrt{x} (1-x)} + \int_{1+\epsilon}^{\infty} du \frac{1}{\sqrt{u} (1-u)} = 0$$
or
$$PV \int _{0}^{\infty} dx \frac{1}{\sqrt{x} (1-x)} = 0$$
as was to be demonstrated.
Consider for $\xi \lt 0$ the contour integral
$$\oint_C dz \frac{e^{-i \xi z}}{2-2 z-z^2} $$
where $C$ is a semicircle of radius $R$ in the upper half plane, with a small semicircular indent into the upper half-plane of radius $\epsilon$ at each pole $z_{\pm}=-1 \pm \sqrt{3}$. The contour integral is then
$$PV \int_{-R}^R dx \frac{e^{-i \xi x}}{2-2 x-x^2} +i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{-i \xi (z_-+\epsilon e^{i \phi})}}{3-(-\sqrt{3}+\epsilon e^{i \phi})^2}\\ + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{-i \xi (z_++\epsilon e^{i \phi})}}{3-(\sqrt{3}+\epsilon e^{i \phi})^2}+ i R \int_0^{\pi} d\theta \, e^{i \theta} \frac{e^{-i \xi R e^{i \theta}}}{2-2 R e^{i \theta} - R^2 e^{i 2 \theta}}$$
In the limit as $R \to \infty$, the fourth integral vanishes as $1/R^2$. As $\epsilon \to 0$, the sum of the second and third integrals converge to
$$i \frac{\pi}{2 \sqrt{3}} \left (-e^{-i \xi z_-} + e^{-i \xi z_+} \right ) $$
By Cauchy's theorem, the contour integral is equal to zero. Thus, for $\xi \lt 0$ we have
$$PV \int_{-\infty}^{\infty} dx \frac{e^{-i \xi x}}{2-2 x-x^2} = -\frac{\pi}{\sqrt{3}} e^{i \xi} \sin{\left (\sqrt{3} \xi \right )} $$
For $\xi \gt 0$, one uses a contour in the lower half plane.
Best Answer
Answering my own question here - it's much easier than I thought!
Assume $Re(z)>1$ (we can extend by analytic continuation later). Use Jordan's lemma in the upper half plane if $g>0$ and in the lower half plane if $g<0$, changing the contour of integration to the upper or lower (respectively) imaginary axis. Then the integral is a $z$-dependent constant times the gamma function. The final answer is:
$G(z)=\exp\big(sgn(g)\frac{zi\pi}{2}\big)|g|^{-z}\Gamma(z)$.