(#22180) Make function, type, fact and node appear in rdoc2 output

The driver for Rdoc1 uses CodeObject classes with specialized
data structures for function, type ("plugins"), facts and nodes. The
standard generators for RDoc2 does not know about these and thus
no output was generated.

This commit changes this for RDoc2 by adding the missing parts using
standard Ruby CodeObject elements (module, method, etc.)

Note that the puppet specific parser is very picky in what it considers
to be a function, type, fact, etc. In fact, it was so picky that it
would almost never find certain elements. This commit also relaxes the
parsing to allow all functions that have :arity specified to be found.

The order in which the parsed object are intitialized is changed (all
details set before adding it to the container). This since the RDoc2
variant creates a different object based on the given data
(documentation is driven from this copy, not the original).
(wip) integration test for puppet doc --mode rdoc with rdoc1 behavior