You are wrong in thinking that a one form, i.e. something like f(x,y)dx + g(x,y)dy), or equivalently a vector field with entries (f,g), must have integral zero around every closed curve whenever d of it is zero, i.e. whenever ∂g/∂x - ∂f/∂y = 0. what is true is that if there is another function h such that f = ∂h/∂x and g = ∂h/∂y, then the integral is zero around every closed curve. This condition implies, but is not implied by, the weaker condition that ∂g/∂x = ∂f/∂y.
However there is a circumstance under which the two conditions are equivalent, namely they are equivalent in any region which, whenever it contains a closed curve, it also contains all points inside that closed curve. (As Orodruin suggested, the proof is to apply Green's theorem in that case). In your example, the functions f and g have denominator x^2+y^2, which means the region in which they are smooth does not contain the origin (0,0). Hence even though ∂f/∂y = ∂g/∂x, there is no guarantee the integral will equal zero around a closed curve that has (0,0) in its interior. Indeed getting a non zero result for the integral of your vector field around a given closed curve thus proves that the origin is inside that closed curve, so you have proved that the origin is inside the closed curve you integrated over.
This phenomenon is a powerful tool in topology for detecting the presence of "holes" in a region, and is the basis for the theory of "cohomology".