brew: move to Library/brew.rb
brew: use a shell wrapper script for brew

This allows us to force using the system Ruby on OSX but allow
the development of Homebrew for Linux or Windows to not rely
on OSX paths.

Closes #17548.