This resolves T73673 by allowing delete hierarchy in all outliner view modes and without requiring collections to be filtered from the outliner. It also unifies the collection and object hierarchy delete into a single operator like in rBae98a033c856. This makes it possible to delete all selected collection and object hierarchies at once.
This also removes the old object delete hierarchy code in favor of the batch delete code which has been default for over a year.