Make xnn_initialize thread-safe

If multiple threads concurrently call xnn_initialize with different
xnn_allocator structures, the xnn_allocator passed to the first call will
be used.

PiperOrigin-RevId: 367313719
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7182ab..b79ae27 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -227,9 +227,9 @@
 
 SET(XNNPACK_COLD_SRCS ${XNNPACK_OPERATOR_SRCS} ${XNNPACK_SUBGRAPH_SRCS} ${XNNPACK_LOGGING_SRCS})
 LIST(APPEND XNNPACK_COLD_SRCS
+  src/allocator.c
   src/init.c
   src/memory-planner.c
-  src/memory.c
   src/operator-delete.c
   src/runtime.c
   src/subgraph.c