C++ API: add more flexibility to `getPhysicalGroups` and `getEntities`
It would be nice that getters of the C++ API like getPhysicalGroups
or getEntities
could also return all objects up to a dimension at once, to avoid a user-side for loop over dimensions.
An embryo of the changes is available there: