The issue was that TypeNode.persistXML and PackageNode.persistXML only
persisted nodes with API visibility, filtering out non-API types even
if they had restrictions like @noreference.
Added shouldPersist() method to check if a node or its descendants
should be persisted based on API visibility OR restrictions, ensuring
nested types with @noreference are included in .api_description file.
Fix https://github.com/eclipse-pde/eclipse.pde/issues/1949
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>