WICKET-5284 Too deep recursion in AbstractHierarchyIterator

Deprecate component hierarchy iterators

(cherry picked from commit d31415397199ecc71f8486124f02a6e983e23781)