Also clean-up this external command in preparation
for becoming a built-in command.
Make which_versions available in Homebrew module so
that it can be used by other commands in the future.
A work-in-progress command, "brew which" will show which versions of formulae
you have installed based on what symlinks exist from HOMEBREW_PREFIX back into
the Cellar.
Thus, if you happen to have symlinks into two different versions of a brew in
the Cellar (typically an error), both of those versions will be listed.
This is a diagnostic command, but some of this code will be the basis for
possible future better handling of multiple-versions-at-once.