AdaptiveMaxConcurrency has two class-static std::string members (UNLIMITED
and CONSTANT) defined in adaptive_max_concurrency.cpp. Global
AdaptiveMaxConcurrency objects in other translation units may be constructed
before these static strings are initialized, causing undefined behavior.
This issue was discovered during RISC-V porting and testing of BRPC.
Different toolchains and linkers (GCC, Clang, cross-compilation toolchains
for RISC-V, etc.) may produce different static initialization orders, making
this bug manifest on some platforms but not others.
Fix by replacing class-static std::string members with Meyers' Singleton
pattern (function-local statics), which C++11 guarantees are initialized
on first use in a thread-safe manner.
This fix benefits all architectures including x86_64, ARM64, and RISC-V.
Signed-off-by: Felix-Gong <gongxiaofei24@iscas.ac.cn>