Add compile-time checks for libandroid_runtime

Before this CL, libandroid_runtime didn't process thread-safety
annotations and didn't enforce the -Wextra checks.

Add those here, along with the required fixes.

Bug: 271455682
Test: m libandroid_runtime
Change-Id: Ibff26167ea142150a461c54ec631b70b6d0d15e5
22 files changed