emulator: Use distinct serial names for simultaneous qemu pipes.

ADB local transport for the emulator based on qemu pipes uses a socket
transport. Before this CL, multiple connection requests accepted by the
qemu pipe device would result in ADB transport with the same serial.
The register function would fail as a result, and all subsequent
connections would fail.

Test:
while true; do adb kill-server; adb devices; done
Doesn't fail for > 10 minutes.

This CL replaces an earlier CL
(I0fdcf2694516151c5f8f8e1580648b940679c981) that was unsafe for real
devices.

BUG=27441661

Change-Id: I7d801b175f3bee10fc7e0ab1b12d5623984371b9
diff --git a/adb/transport_local.cpp b/adb/transport_local.cpp
index 372bedf..f6c9df4 100644
--- a/adb/transport_local.cpp
+++ b/adb/transport_local.cpp
@@ -260,7 +260,8 @@
             } else {
                 /* Host is connected. Register the transport, and start the
                  * exchange. */
-                register_socket_transport(fd, "host", port, 1);
+                std::string serial = android::base::StringPrintf("host-%d", fd);
+                register_socket_transport(fd, serial.c_str(), port, 1);
                 if (!WriteFdExactly(fd, _start_req, strlen(_start_req))) {
                     adb_close(fd);
                 }