You can't write a proper proxy as a Servlet, for a number of reasons. For one thing, you are introducing far too much latency, as the request is completely assembled by the servlet container before you get to create the upstream connection.
An HTTP proxy is a very simple thing, unless you need to look into the requests and responses. All you have to do is parse the incoming CONNECT command, form the upstream connection, and then start copying bytes in both directions simultaneously. It doesn't matter whether the upstream connection is HTTP or HTTPS, the code is the same.
To answer your specific questions:
You should read from each peer until you receive EOS. At that point you should shutdown the socket to the other peer for output. If you have already shutdown the socket you read the EOS from, you should then close both sockets.
Plaintext. The incoming HTTP CONNECT command is always in plaintext, and you don't care what the upstream connection is, as you are just copying bytes. The peers will negotiate SSL if necessary, but that's nothing to do with you.