HomeSoftware Heritage

Use AllowedNodesTest to implement return type filtering

Description

Use AllowedNodesTest to implement return type filtering

Old implementation used a new NodesFiltering class for no apparent
reason, whereas something was already implemented to parse node filter
strings.
Plus, the old implementation would only filter the results of the eager
functions, instead of filtering upstream before the visitor callbacks
were called, which made it not work for most use cases.

Fix T2981