CTS test for Heartbleed vulnerability in SSLSocket.

This tests for the Heartbleed vulnerability (CVE-2014-0160) in
OpenSSL by testing client- and server-mode SSLSocket which is
supposed to be backed by OpenSSL by default.

This test spawns an SSLSocket client, SSLServerSocket server, and a
Man-in-The-Middle (MiTM). The client connects to the MiTM which then
connects to the server, and starts forwarding all TLS records between
the client and the server, injecting a malformed HeartbeatRequest
when appropriate. The test passes only if no HeartbeatResponse is
emitted and the TLS handshake either succeeds (heartbeats supported)
or fails with fatal alert unexpected_message (heartbeats not
supported).

Bug: 13906893
Change-Id: I9d60352b62ceecb8b928b39395c30c609a50f289
Fix a concurrency bug in OpenSSLHeartbleedTest.

The test was not guaranteed to observe all of the data transmitted by
the client in the scenarios where the client failed. As a result, the
test was occasionally failing (instead of passing) when the client
terminated the TLS/SSL handshake with the fatal alert
unexpected_message.

This CL fixes the test by ensuring that the test observes all of the
data exchanged between the client and the server.

Bug: 13906893
Change-Id: Ieb835821db4bb6403492ad99073294104722d539