Using tokio to complete the rust DoH query implementation

This CL is the complement based on aosp/1531539 by using tokio.
Some implementations are took from aosp/1550834.
This CL would only focus on rust part of DoH.

Using tokio to re-write the event loop and I/O handling.

Test: atest
Bug: 155855709
Change-Id: I5bcc701178358bc442bd8c2af5df03399d7a8137
Merged-In: I616933251aec49c60c850198c0594861009c2bb8
Ignore-AOSP-First: This CL is merged into aosp but wrongly skipped in internal git.
So put it back.
diff --git a/doh.h b/doh.h
new file mode 100644
index 0000000..d04feb4
--- /dev/null
+++ b/doh.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This file is autogenerated by:
+//   cbindgen --config cbindgen.toml doh.rs >doh.h
+// Don't modify manually.
+
+#pragma once
+
+/* Generated with cbindgen:0.15.0 */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+/// Context for a running DoH engine and associated thread.
+struct DohServer;
+
+extern "C" {
+
+/// Performs static initialization fo the DoH engine.
+const char* doh_init();
+
+/// Creates and returns a DoH engine instance.
+/// The returned object must be freed with doh_delete().
+DohServer* doh_new(const char* url, const char* ip_addr, uint32_t mark, const char* cert_path);
+
+/// Deletes a DoH engine created by doh_new().
+void doh_delete(DohServer* doh);
+
+/// Sends a DNS query and waits for the response.
+ssize_t doh_query(DohServer* doh, uint8_t* query, size_t query_len, uint8_t* response,
+                  size_t response_len);
+
+}  // extern "C"