Add suport for connecting via SOCKS4(a)/SOCKS5 using txsocksx

Patch originally by Arturo Filasto, with changes by Yawning Angel.  This
patch depends on pyptlib modifications as it also supports using the
managed TOR_PT_PROXY enviornment variable.

WARNING: Attempting to use a http proxy will break mysteriously as the
connect routines are just stubbed out.