in your example the region inside the circle of integration had two points where z^2-1 was equal to zero, hence two places where the square root function changes sign when a loop encircles one of those points. this emans that the square root function is really defined on a "double cover" of that circular region with "branch points" at both 1 and -1.
a double cover of a disc with two branch pionts is not so easy to picture, but is not a disc. It is a cylinder, and your integral was taken around only one end circle of the cylinder. cauchy's thm says if the integral is taken over the full bondary of a surface, it is zero, but all it says here is the integral is minus the integral over the other boundary circle.
i.e. if w = sqrt(z^2-1), then w^2 = z^2-1 defines a curve in the plane on which the function w really is well defined. but that curve projects via the projection taking (z,w) to z, two to one onto the z plane. since there is only one point over each of the points z = 1 and z = -1 we call those branch points.
the cylindrical region mentioned above, is the inverse image under this projection, on the curve with equation w^2 = z^2 -1, of the interior of your circle of integration in the z plane. abel and galois studied these integrals, but since the both died in their 20's, riemann was first to lay it all out. he of course lived to the ripe old age of 39 or so.
this geometric analysis does not make it any easier to calculate your integral, but does show what is going on.
people think riemann surfaces are very fancy, but all they are is essentially the graph of the (multi valued) function. i.e. the graph of a single valued function apsses the vertical line test, and the graph of a general multivalued one does not, that's all.
i.e. the "riemann surface" of the multivalued function w = sqrt(z^2-1) is just the graph of the equation w^2 = z^2 -1.
there is a little more to it, like adding in points at infinity, if any, and then removing singular points, if any, but those are technicalities.
they do affect the genus though as hurkyl discovered for an elliptic curve.
i.e. the riemann surface of the function sqrt(z^3-1) is the graph of w^2 = z^3-1. completed by adding one point at infinity, and has genus one, given by the formula g = (1/2)(d-1)(d-2) where d is the degree.
for the function sqrt(z^4-1) however, the riemann surface is the graph of w^2 = z^4-1, but when you add in the point at infinity, it is not a manifold point, but a singular point and in this case analyzing it shows it subtracts 2 from the genus. so the genus is (1/2)(d-1)(d-2) - 2, where the dewgree is 4, so we get 3-2 = 1 again for the genus.
in your case, a double cover of a sphere (the z plane with one point at infinity) with 2 branch points is again a sphere, so the genus of the riemann surface of w = sqrt(z^2-1), i.e. the completed graph of w^2=z^2-1, has genus again (1/2)(d-1)d-2) = 0, where d = 2.