adb: Handle adb connect in a thread

adb connect calls connect() in the event loop. If you pass a wrong ip
address or the server is slow to respond, this will block the event loop
and you can't even kill the adb server with adb kill-server. Handle connect
requests in a service thread instead.

Change-Id: I2ee732869a3dc22a6d3b87cf8ac80acaa7790037
diff --git a/adb/adb.h b/adb/adb.h
index 38767e5..622ca70 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -289,7 +289,7 @@
 void close_usb_devices();
 
 /* cause new transports to be init'd and added to the list */
-void register_socket_transport(int s, const char *serial, int port, int local);
+int register_socket_transport(int s, const char *serial, int port, int local);
 
 /* these should only be used for the "adb disconnect" command */
 void unregister_transport(atransport *t);