tests: add recurse_deps_internal helper
Sometimes when diagnosing issues there's just no substitute for looking
at the output of the recurse_deps_internal function.
Therefore provide a helper that can easily show it thus making it
readily available for tests and diagnostic work.
And this version even allows the function to be run without using
the cache (horribly slow) in case that's needed to diagnose whether
or not the issue might actually be in the caching side of things.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>