Update `brew tap` to work without 'homebrew-' Fixes #18432

Currently `brew tap` only works on repos with 'homebrew-' in their name.

This version tries to find 'homebrew-repo' and then falls back to try
'repo' if that fails.

In the process of fixing #18432, I've made a number of changes:

+ Followed @englishm's advice and checked for 'homebrew-repo' *first*.
+ Rather than `begin...rescue` for curl, I've used backticks and a manual
  check of $? to be more consistent with the rest of the method.
+ Fixed the error message if the repo is private: the read-only git URL
  should be in the form git://github.com/#{repouser}/#{repo}.git I think.

I've also tweaked the regex  in tap_args to allow '-' in repo names. The
previous regex required a match on \w. This made it impossible for people
to tap repos with names like 'username/why-not'.