(Maint) Mark AdditionalResourceGenerator as private
(#22229) Ensure generated resources contained

The generated resources were left out in the cold with respect to
containers: they had none at all. This changes that to make sure that
the generated resources (via #generate and #eval_generate) have the same
container as the resource that generated them.
(#22229) Provide way of getting the container

The catalog tracks the relationship between the container and the
contained resource but did not provide any clear way to query for the
containment information. This adds a new method #container_of(resource)
that will return the container of the given resource, when one exists.
This removes some duplication around understanding what the container
is.
Merge pull request #1855 from zaphod42/issue/master/22229-ensure-generated-resources-contained

(#22229) Ensure generated resources contained