Support in-memory HTTPS session caching for wrapped sockets.

Previously we couldn't reuse sessions with HttpsURLConnection
because the host was incorrect (getInetAddress returns null
for wrapped sockets) and because the compression method was
different (NULL vs. ZLIB).

This improves HttpsURLConnection request/response time on
localhost from ~275ms to ~145ms (without connection pooling).

Change-Id: I97bc343326658690b00589c0c804c2378b91ae61
2 files changed