Remove explicit xz deps from formulae with HEAD specs

These deps are only needed for the stable download, but they will get
pulled in for HEAD builds unless the are scoped appropriately (i.e.
inside a stable block).

Since they are also auto-detected from the URL now, we can just remove
them.
Silence some Ruby 2.1 warnings
Pass deps collection to be expanded as a parameter
Use separate collection for requirement deps
Move dependency expansion logic up one level
Rename filter_deps to expand_dependencies
Compute recursive deps for default_formula deps
Ensure option names are consistent for default formula requirements
Expand requirements of default deps added by other requirements

Dependencies built from requirements with a default formula may
themselves have requirements, and these requirements may have default
formulae, which may have more requirements, etc., so we have to keep
expanding until this isn't the case.

Fixes #25025.
Fixes #25037.