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
(cherry picked from commit 8c5f210b390ac4287cffceb1eb35b248e04cc128)

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

Change-Id: Ic714fbd4fba4862d5452fccbbdbe3df03619eb00
1 file changed