Restore __ANDROID_API__ guards for core <android/*> APIs

This commit restores the __ANDROID_API__ guards removed in
"Add __INTRODUCED_IN to core <android/*.h> APIs.",
commit 9db409b053460e065cefb1d1caefe048f90cfff0.

Add a guard to surface_texture.h.

In choreographer.h, declare the types even for older APIs.

Bug: http://b/111668906
Bug: http://b/113052379
Test: builds
Change-Id: Ia013f48a109310f9f8ca6a3211f28fcb69dd602d
(cherry picked from commit 92b1ebea095f9cac70b81ae7382ae69583c9914d)
diff --git a/include/android/sharedmem.h b/include/android/sharedmem.h
index 5a4f695..8c3ff74 100644
--- a/include/android/sharedmem.h
+++ b/include/android/sharedmem.h
@@ -28,6 +28,7 @@
 #define ANDROID_SHARED_MEMORY_H
 
 #include <stddef.h>
+#include <sys/cdefs.h>
 
 /******************************************************************
  *
@@ -49,6 +50,8 @@
 extern "C" {
 #endif
 
+#if __ANDROID_API__ >= 26
+
 /**
  * Create a shared memory region.
  *
@@ -109,6 +112,8 @@
  */
 int ASharedMemory_setProt(int fd, int prot) __INTRODUCED_IN(26);
 
+#endif // __ANDROID_API__ >= 26
+
 #ifdef __cplusplus
 };
 #endif