I'm a little confused on the concept of singularities at infinity. For example, take the function $f(z) = 1/z$. This has a removable singularity at infinity, since $f(1/z) = z$ is analytic at zero.
However, the residue of $f(z)$ at infinity is by definition $$\text{Res } 1/z^2 f(z) = -1.$$ which is nonzero.
This seems bizarre; for removable singularities in the regular complex plane have residue equal to zero. If we intuitively think of the definition of a residue to mean the coefficient of $z^{-1}$, then it also appears that we have a 'pole' of order at least one at infinity, despite the fact that it vanishes at infinity. Again, this is in contrast to points in the plane where functions always blow up at poles.
I think this shows that Cauchy's integral theorem fails at infinity, so a function analytic in a neighborhood of infinity does not necessarily have a zero contour integral over a curve enclosing infinity.
What other pathologies do singularities at infinity exhibit? Can anybody clarify just what is going on here and what to watch out for? Or provide a good reference?