DO NOT MERGE: Fix CtsTestServer potential shutdown deadlock.

The client thread and server thread may deadlock when shutting down a
test server. The server thread will be stuck in SSL_read and the client
thread will be stuck in SSL_start_handshake.  (Refer to crbug.com/514473
and crbug.com/514474 for deadlock details.)

To avoid the deadlock, do not open another connection during shutdown.
Instead, just close all the sockets.

BUG: crbug.com/514473, crbug.com/514474, b/27595512

 Conflicts:
	libs/testserver/src/android/webkit/cts/CtsTestServer.java

(cherry picked from commit 1ec73b8bfbcd2f4732bc2ff19a843c52cf0d8dd9)

Change-Id: Ief21080046037e40e75afc5daba516dc4090e256
1 file changed