(#22142) Substantial speed increase in lookups

Previously, hiera would look up the 'datadir' from config
inside the loop where it looks inside datafiles. This caused
substantial slowdowns on sites with deep hierarchies.

This commit moves the datadir lookup to be outside the
the datasource-search loop and caused substantial speedups.
(Timings are in the original ticket).

This patch was written by Sean Millichamp; I just rebased it
onto the current state of Hiera and submitted it on his behalf.
(#22142) Extract method to list all hierarchy files

The patch to reduce the work done when traversing the hierarchy
duplicated the datafile() method from Backend. This removes the
duplicate code from the yaml backend and creates a new method on Backend
to get just the files associated with the hierarchy.
Merge branch 'ahpook-22142-datadir-speedup'

* ahpook-22142-datadir-speedup:
  (#22142) Extract method to list all hierarchy files
  (#22142) Substantial speed increase in lookups

Closes GH-159