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/system_properties/context_node.cpp b/libc/system_properties/context_node.cpp
index 13cef75..5496b5a 100644
--- a/libc/system_properties/context_node.cpp
+++ b/libc/system_properties/context_node.cpp
@@ -26,13 +26,14 @@
  * SUCH DAMAGE.
  */
 
-#include "context_node.h"
+#include "system_properties/context_node.h"
 
+#include <limits.h>
 #include <unistd.h>
 
 #include <async_safe/log.h>
 
-#include "property_filename.h"
+#include "system_properties/system_properties.h"
 
 // pthread_mutex_lock() calls into system_properties in the case of contention.
 // This creates a risk of dead lock if any system_properties functions
@@ -49,8 +50,7 @@
   }
 
   char filename[PROP_FILENAME_MAX];
-  int len =
-      async_safe_format_buffer(filename, sizeof(filename), "%s/%s", property_filename, context_);
+  int len = async_safe_format_buffer(filename, sizeof(filename), "%s/%s", filename_, context_);
   if (len < 0 || len > PROP_FILENAME_MAX) {
     lock_.unlock();
     return false;
@@ -85,8 +85,7 @@
 
 bool ContextNode::CheckAccess() {
   char filename[PROP_FILENAME_MAX];
-  int len =
-      async_safe_format_buffer(filename, sizeof(filename), "%s/%s", property_filename, context_);
+  int len = async_safe_format_buffer(filename, sizeof(filename), "%s/%s", filename_, context_);
   if (len < 0 || len > PROP_FILENAME_MAX) {
     return false;
   }