Extracting intersecting objects of the same colour from an image
First, I would suggest you to take a look at morphological operations on images, especially dilation and erosion. Dilation grows the boundary of foreground pixels (gets rid of holes), and erosion shrinks the boundary of foreground pixels (gets rid of bridges). In your case, erosion with an appropriate kernel might get rid of those unwanted lines. Then you apply dilation with the same kernel to preserve the circles. The two of them applied together in this order is called opening. Those functions are predefined in OpenCV, check out morphologyEx function. 

Second, I would suggest you to take a look at convexity of shapes. The output circles in your images are convex, but the ones with lines are now. Thus, you can find the non-convex points of the contours (that you already found), and connect the contours from those points, so that you have convex shapes, i.e. desired output circles. To accomplish this, you can find the convex hull and convexity defects using related OpenCV functions.