[clang-doc][NFC] Move static functions into JSONGenerator as methods (#184663)
Most of the JSONGenerator functionality was provided by a series of
static functions. This made it unwieldy to access useful properties of
ClangDocContext. As methods, they can now access a pointer to CDCtx.
An LLM was used to automate declaring the functions inside the class and
adding the scope resolution operators.
Fixes #181767