Set debug log level when running tests as __main__
Rewrite connection pool exception handling

The connection pool now uses a much simpler try/except/finally block in
the context manager function to detect network/Thrift errors. The pool
will now only refreshes connections when Thrift or socket errors occur,
and will not react to unrelated application errors anymore.

With this approach, the _ClientProxy hack is not needed anymore, so it
has been completely eliminated.

See issue #25.