Introduce api to track fd ownership in libc.

Add two functions to allow objects that own a file descriptor to
enforce that only they can close their file descriptor.

Use them in FILE* and DIR*.

Bug: http://b/110100358
Test: bionic_unit_tests
Test: aosp/master boots without errors
Test: treehugger
Change-Id: Iecd6e8b26c62217271e0822dc3d2d7888b091a45
diff --git a/libc/libc.mips64.map b/libc/libc.mips64.map
index 3e20d7e..2f5c4ab 100644
--- a/libc/libc.mips64.map
+++ b/libc/libc.mips64.map
@@ -1344,6 +1344,11 @@
 LIBC_Q { # introduced=Q
   global:
     __res_randomid;
+    android_fdsan_close_with_tag;
+    android_fdsan_create_owner_tag;
+    android_fdsan_exchange_owner_tag;
+    android_fdsan_get_error_level;
+    android_fdsan_set_error_level;
     timespec_get;
 } LIBC_P;