cmDefinitions: Reduce memory usage
Currently we store copies of
std::string for every key and value, and make new copies to initialize each subdirectory. This uses a lot of memory in projects with a lot of variables and subdirectories. We can reduce it by sharing storage for keys and values that are common.