install: add --only-dependencies option

The traditional approach to installing the dependencies of a formula is
the following:

  brew install `brew deps formula`

This approach ignores any options that are specified in the parent
formula. This pull request adds a --only-dependencies option to brew
install that installs the dependencies of a formula with optional flags,
but returns before installing the parent formula.

Closes #25272.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Note when --only-dependencies is a no-op
brew-test-bot: use install --only-dependencies.