Implement a C++ code generator for libconfig

fixes #7699
fixes #7704
fixes #7706