[Cherry-pick] Add sys/cdefs and __REMOVED_IN define to looper.h

The looper.h header introduced __REMOVED_IN, which requires the
sys/cdefs.h header to provide definitions for the macro. Add them here
and update files that include looper.h to not provide their own
definitions of __REMOVED_IN. Further, update comments to clarify that
the additional defines are in place to satisfy builds that use glibc or
Windows/MacOS libcs.

Bug: 14257980
Change-Id: Ia524b7e180c5137e84c205a77dc219b9e9e41608
diff --git a/include/android/looper.h b/include/android/looper.h
index 4fe142a..e50730d 100644
--- a/include/android/looper.h
+++ b/include/android/looper.h
@@ -26,10 +26,18 @@
 #ifndef ANDROID_LOOPER_H
 #define ANDROID_LOOPER_H
 
+#include <sys/cdefs.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+// This file may also be built on glibc or on Windows/MacOS libc's, so
+// deprecated definitions are provided.
+#if !defined(__REMOVED_IN)
+#define __REMOVED_IN(__api_level) __attribute__((__deprecated__))
+#endif
+
 struct ALooper;
 /**
  * ALooper