discard dodgy thrift connections, thread-safe pooling

I had issues using elasticsearch-py and ThriftConnection in connection with threads as well as greenlets.
At some point, thrift connections seem to go into a weird state, and you end up getting responses for requests sent from another thread and vice versa.
This breaks for python 3, needs to be:

    try:
        from Queue import Queue
    except ImportError:
        from queue import Queue