Why is the pole generally outside the contour loop when its outside the contour loop in 2D? The following contour integral is path dependent with the following results
\begin{align}
\oint_C\dfrac{dz}{z} = 
\begin{Bmatrix}
2\pi i && \text{when $z=0$ is inside C}
\\
0 && \text{when $z=0$ is outside C}
\end{Bmatrix}
\end{align}
however when I think of how the complex plane can be embedded to the surface of the Riemann sphere, I realize a contradiction. A loop which does not locally enclose a pole on a closed surface, such as the Riemann sphere, encloses it globally by going the other way around the closed surface. We are taught in complex analysis that all complex infinities converge at the same point, probably in reference to the Riemann sphere? This creates a contradiction on what it means to take a contour integral around a pole and not around a pole. 

I am curious to know if this is a topology issue, because the difference between integrating on the complex plane versues the Riemann sphere, is there metrics are different
\begin{align}
\text{plane metric} && |dz|^2  &=& dx^2+dy^2
\\
\text{sphere metric} && |dz|^2  &=& \dfrac{4}{1+x^2+y^2}(dx^2+dy^2)
\end{align}
which would imply a different definition of the contour integral.
Why is the pole generally outside the contour loop when its outside the contour loop in 2D?
 A: If you want to know what's going on near the point at infinity on the Riemann sphere, you should almost always make the substitution $w \mapsto \frac{1}{z}$ and look at what's going on near zero.
If you make that substitution in your integral, you get
$$
\int_C \frac{dz}{z}=\int_{C'} w \, \left(\frac{-dw}{w^2}\right)=-\int_{C'}\frac{dw}{w}
$$
where $C'$ is the contour that results from inverting $C$ about $0$.
If $C$ was positively oriented, $C'$ will be negatively oriented. This cancels out the minus sign that was introduced in the variable change, so in fact this integral, like the original one, will be equal to
$$
\begin{cases}
2\pi i & \text{when } w=0 \text{ is inside } C' \\
0 & \text{when } w=0 \text{ is outside } C'
\end{cases}
$$
But $w=0$ corresponds to $z=\infty$, so this is saying that the integral is $2\pi i$ when our contour includes $\infty$, and $0$ when it does not (in the $w$-plane, which includes $\infty$ but omits $0$).
How should we interpret this in terms of the Riemann sphere? The natural thing to say is that $\int_C \frac{dz}{z}$ will be nonzero if $C$ separates $0$ from $\infty$, and zero if it doesn't. This is a topologically well-defined notion, as there are loops on the twice-punctured sphere that can't be shrunk to a point. That is, if you want to take your loop that goes around zero and shrink it to a point by going "around the other side of the sphere", it'll have to pass through $\infty$ — and the computation we just did shows that the integral has a singularity at $\infty$ as well as at $0$, so that's disallowed.
A contour integral that's only singular at $0$, and not at $\infty$, really will vanish, for exactly the kind of topological reason you've pinpointed in your question! For example, this is one way of seeing that
$$
\int_C \frac{dz}{z^2}=0
$$
for any contour $C$ that doesn't pass through the origin.
A: Simply define a point to be "inside" a curve, if the point is on the right hand side of the curve as you traverse the curve clock-wise.
