More context when the hostname is not verified.

    Exception in thread "main" java.io.IOException: Hostname square.com not verified:
        certificate: sha1/FBzx5Wrwa9EpylnPrsKjpBQu1RE=
        DN: CN=square.com, OU=Information Security, O=Square Inc., STREET=1455 Market Street, L=San Francisco, ST=California, OID.2.5.4.17=94103, C=US, SERIALNUMBER=4699855, OID.2.5.4.15=Private Organization, OID.1.3.6.1.4.1.311.60.2.1.2=Delaware, OID.1.3.6.1.4.1.311.60.2.1.3=US
        subjectAltNames: [square.com, www.square.com, cash.square.com, blog.square.com]
          at com.squareup.okhttp.Connection.upgradeToTls(Connection.java:242)
          at com.squareup.okhttp.Connection.connect(Connection.java:155)
          at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:171)
          at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:119)

Closes https://github.com/square/okhttp/issues/1163
Fix tests that fail on some Android devices

Some tests fails on some Android devices because they have
larger buffer sizes. Setting the buffer size of sockets used
in tests that rely on blocking behavior ensures consistency.

ThreadInterruptTest#interruptWritingRequestBody
URLConnectionTest#writeTimeouts
Merge pull request #1169 from nfuller/FixTestOnAndroid4

Fix tests that fail on some Android devices
Merge pull request #1167 from square/jwilson_1125_hostname_verifier_fails

More context when the hostname is not verified.
Modify bad CONNECT handling

Changing the way that OkHttp handles CONNECT responses
from proxies.

Before the change:
If a proxy returns a body and some of the body bytes have
already been buffered then an IOException is thrown.
If the body bytes have not been buffered then the handshake will
fail due to the presence of bytes where the Server HELLO is
expected, typically with some kind of SSLHandshakeException.

After the change:
The body bytes are consumed to ensure consistent behavior. The
handshake will then take place.

History:
This is an unusual case that would occasionally cause failures
on Android when a ResponseCache was installed. Android introduced
a patch to prevent CONNECT responses being cached. Since then,
OkHttp has changed the code and probably fixed the issue via
other means. The Android test remained and would sometimes
experience one exception, sometimes another, depending on the
state of the buffer.

If the presence of a body is a possibility it would be nice
to deal with it consistently and deterministically.

The motivation for this change is to make
URLConnectionTest#connectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache
behave consistently and in a way that doesn't involve connection
fallback.

The only risk with this change is if a proxy is incorrectly
reporting the content length: this might lead to blocking on
the body read/skip (as OkHttp would probably do elsewhere if a
server mis-reports a content-length). This change may make
connections to "bad" proxies slightly more reliable.
Merge pull request #1171 from nfuller/ConnectChange

Modify bad CONNECT handling