brew.rb: handle -—help for internal/external cmds.

Only display —-help for internal commands and not for external ones;
they can handle the flag themselves.

Closes #26675.
References #26755.
Closes #30300.