Cleaning up `CustomResourceAnalyzer` code.

Reducing duplicate code and refactoring some variables.
Adding missing function documentation to `AnalyzerRenderer` and `RendererGroup`.