Use thread-local variables to prevent recursive #connect invocation

Instead bail out immediately in a recursive connect scenario. Resolves mutex deadlocks and prevents potential infinite recursion in weird networking circumstances.

Passes normal/RS/sharded_cluster suites under 1.8.7-p371, 1.9.3-p327, and JRuby 1.7.1. Additionally, I ran those suites both against mongod 2.2.2 and mongod 2.3.1, all passing.