rename tests to match the class layout
refactor to simplify method

This way _connect_to_real_server() only does one thing
The state machine can now use a web proxy
improve error message by including the HTTP response code
a non-transparent proxy does not have to rewrite URLs like this
a properly functioning read_request_from_socket()

The old one was blocking until the sending side had closed the socket (by
then it had timed out).  We can also know when we've read enough by looking
at the Content-length header.
the simple locking test works with the new proxy code