brew-stack: (WIP) command to create portable Homebrew install directory

Install a formula and dependencies from pre-made Homebrew bottles or as built bottles. Useful for creating a portable Homebrew directory for a specific OS version.

_Example:_ portable domain-specific software stack in custom Homebrew prefix

Use command in `brew bundle` Brewfiles to quickly build full stacks. Also, --dry and --all options' output helps create correctly ordered Brewfiles when you want to use custom options for dependencies and build those first.

This external command is a followup to the discussion in #30393. However, I think the env variable is a more bombproof approach, though `brew stack --dry [--all]` does output some pretty useful info.

**I have run into two problems**, though, that I could use some advise on 
(test with `brew stack --dry [--all] ...`):

1. Is it possible to do deps and requirements expansion and checks from an external command?

    Current code causes too many deps to be installed, e.g. Homebrew's python is installed, even though not requested. This is because `brew stack` is currently missing the [deps and requirements expansion and checks found in `FourmulaInstaller`](https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/formula_installer.rb#L220-L235). 

2.  Is there a way to turn off inherited options? Or, shouldn't they ever be turned off?

    Example: `brew install aaa --with-python --with-bbb` triggers `brew install bbb --with-python` (a viable option for `bbb`). I don't want/need the latter; and, the `bbb --with-python` functionality has no bearing on the how `bbb` is used by `aaa`

Please feel free to be critical of the code, as Ruby is a second language to me. _Also, it's July 4th holiday here in US, so I might not respond for a couple of days._