Added timeout to python driver
clears python timeout after handshake is complete
adds test for python timeout
cleans up state from python timeout testing
fixes 1033 for JS
close connection after failed handshake