Fixed deadlock that occurs in a certain import scenario.

When user code imports code that initiates a new connection, it could cause a
deadlock when String.encode was called in a seperate thread (e.g. when reading
messages from the cassandra server).
See http://bugs.python.org/issue10923
Merge pull request #44 from roncohen/master

Fixed deadlock that occurs in an import scenario.