(Closed) Line integral of Conservative Field. Suppose we have a conservative Field $ \vec F: D' \subseteq R^2 \rightarrow R^2$
where D is a set of points inside a closed curve (for example all the points inside a circle). Say we have subset of D', call it D, which is also surrounded by a closed curve C.
We know that if we want to find the line integral of F along the  boundary of D (C) : $ \oint \limits_C Fds $ :
From Green's theorem that $ \oint \limits_C Fds = \iint \limits_D ({\partial_{F_x} \over \partial_y}-{\partial_{F_y} \over \partial_x})dxdy $.
As a result, since F is conservative, the two partial derivatives are the same, so the result is 0: in any closed curve the work is 0 if F is conservative, simple. 
Now suppose that F can't be defined in a point $ \vec a $ of D.Then, in that one point the expression inside the double integral doesn't have a meaning, since it's not defined, therefore we can't say that the result is 0, we can't even use green's theorem. (right?)
My question(s)
1. Why can't we use green's theorem?I thought that if there is just one point of discontinuity then it's ok to integrate (i.e if the measure of the set of discontinuity points is 0 in $R^2$ then the function can be integrated).
2. I read that, in order to calculate the line integral (which isn't 0), we take a small circle around the point where it's not defined. The we have one big "bubble" D and another small one A inside it and the difference of these 2 gives us a set ( a bubble with a hole inside) G, where F is well defined and conservative.Then the boundary of G (call it $\partial G$) is the boundary of D (C or $\partial D$) minus the boundary of A (call it $\partial A$). 
Since F conservative in G,the double integral  on G will be 0, so from Green's Theorem : $\oint \limits_{\partial G} Fds =0$. 
BUT $\oint \limits_{\partial G} Fds =\oint \limits_{C= \partial D} Fds -\oint \limits_{\partial A} Fds$, therefore $\oint \limits_{C} Fds = \oint \limits_{\partial A} Fds $ which is not 0.
So, first of all wtf? Second, can't I choose ANY closed curve around the point where F is not defined and do the same?Will I always find the same result then?
3. How is this explained from the scope of physics? The gravitational field can't be defined at 0, so if I do a perfect closed route around the center of earth (theoretically it is possible), then gravity will have actually produced work? How and why?
By the way I calculated the line integrals of such a function in geogebra apps: if the point where the function wasn't defined was NOT inside the curve, then the result was 0.If the point was inside the closed curve it wasn't.
 A: One can use Green's Theorem if the offending point, say $\vec r_0$, is excluded from the region of integration. 
To do that, we deform the boundary contour with a "keyhole" contour that encircles the excluded point $\vec r_0$.  
This reduced the problem to evaluating the line integral 
$$\lim_{\epsilon \to 0}\int_0^{2\pi}\vec F(\vec r_0+\epsilon \hat r)\cdot \hat \phi \epsilon \, d\phi \tag 1$$
For example, suppose $\vec F(\vec r)=\frac{-\hat xy+\hat yx}{x^2+y^2}$.

NOTE:
The vector $\vec F$ here represents the static magnetic field $\vec H$ (modulo the constant $I/2\pi$) from a line current $I$ aligned along the $z$-axis.

Clearly, for all $(x,y)\ne (0,0)$, the first partial derivatives of $\vec F$ satisfy the relationship
$$\frac{\partial F_y}{\partial x}=\frac{\partial F_x}{\partial y} \tag 2$$

NOTE:
We remark that $(2)$ is the $z$ component of the curl of $\vec F$, which by Maxwell's Equation for static magnetic fields is $\hat z\cdot \nabla \times \vec H=0$ for $\vec r \ne 0$.

However, $\vec F$ is singular at the origin.  We can still use $(2)$ in Green's Theorem to evaluate the line integral of $\vec F$ on any contour $C$ that encloses the origin by using the contour deformation given in $(1)$.  Proceeding we find with $\vec r_0=0$ 
$$\begin{align}
\oint_C \vec F(\vec r)\cdot \,d\vec \ell&=\lim_{\epsilon \to 0}\int_0^{2\pi}\vec F(\vec r_0+\epsilon \hat r)\cdot \hat \phi \epsilon \, d\phi\\\\
 &=\lim_{\epsilon \to 0}\int_0^{2\pi} \left(\frac{\hat \phi}{\epsilon}\right)\cdot \hat \phi \epsilon \,d\phi\\\\
&=2\pi
\end{align}$$
as expected from Ampere's Law (after multiplying by $I/2\pi$).
