Change DnsTlsTransport to store a copy of a query

This is preparation for configurable per-query timeout in order to
allow a lookup thread to exit while a DnsTlsSocket loop thread is
still waiting the response. Since a DnsTlsTransport instance is
accessible to both lookup threads and a DnsTlsSocket loop thread, change
it to store a copy of a query in case of any operation needed for
the query in the loop thread; for example, the response arrives after
timeout.

Bug: 120182528
Bug: 141218721
Test: cd packages/modules/DnsResolver && atest
Change-Id: I57bf40cb1eb0d688d5328242649c841f20d81430
diff --git a/resolv_tls_unit_test.cpp b/resolv_tls_unit_test.cpp
index 1fbf5ae..5a03db7 100644
--- a/resolv_tls_unit_test.cpp
+++ b/resolv_tls_unit_test.cpp
@@ -887,9 +887,9 @@
     EXPECT_EQ(1, all[1].newId);
     EXPECT_EQ(2, all[2].newId);
 
-    EXPECT_EQ(makeSlice(q0), all[0].query);
-    EXPECT_EQ(makeSlice(q1), all[1].query);
-    EXPECT_EQ(makeSlice(q2), all[2].query);
+    EXPECT_EQ(q0, all[0].query);
+    EXPECT_EQ(q1, all[1].query);
+    EXPECT_EQ(q2, all[2].query);
 
     bytevec a0 = make_query(0, SIZE);
     bytevec a1 = make_query(1, SIZE);