Split properties into their own class to make testing better

Reinitializing system properties can result in crashes later in the
program, and is generally not recommended or even supported.  This
change moves the actual logic for system properties into a class that
can be tested in isolation, without reinitializing the actual system
property area used in libc.

Bug: 62197783
Test: boot devices, ensure properties work
Test: system property unit tests and benchmarks
Change-Id: I9ae6e1b56c62f51a4d3fdb5b62b8926cef545649
diff --git a/libc/Android.bp b/libc/Android.bp
index 1017fa5..4db4f56 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1387,6 +1387,8 @@
         "bionic/sys_time.cpp",
         "bionic/sysinfo.cpp",
         "bionic/syslog.cpp",
+        "bionic/system_property_api.cpp",
+        "bionic/system_property_set.cpp",
         "bionic/tdestroy.cpp",
         "bionic/termios.cpp",
         "bionic/thread_private.cpp",
@@ -1400,13 +1402,6 @@
         "bionic/wctype.cpp",
         "bionic/wcwidth.cpp",
         "bionic/wmempcpy.cpp",
-        "system_properties/context_node.cpp",
-        "system_properties/contexts_split.cpp",
-        "system_properties/contexts_serialized.cpp",
-        "system_properties/prop_area.cpp",
-        "system_properties/prop_info.cpp",
-        "system_properties/system_properties.cpp",
-
 
         // This contains a weak stub implementation of __find_icu_symbol for wctype.cpp,
         // which will be overridden by the actual one in libc.so.
@@ -1424,7 +1419,7 @@
             cflags: ["-DTREBLE_LINKER_NAMESPACES"],
         },
     },
-    whole_static_libs: ["libpropertyinfoparser"],
+    whole_static_libs: ["libsystemproperties"],
     cppflags: ["-Wold-style-cast"],
     local_include_dirs: ["stdio"],
     include_dirs: ["bionic/libstdc++/include"],