Refactor {develop,production}_brew_cask

Almost all of these two scripts are identical. Refactor out the common
bits, saving over 60 lines of repetition.

Right now this is handled by moving all the logic into "develop_brew_cask"
and symlinking "production_brew_cask".

This will be followed by another patch to add a "manage_brew_cask_links"
command to do the same with sub-commands, e.g.,
  manage_brew_cask_links status
returns "production" or "develop",
  manage_brew_cask_links production
does the same as production_brew_cask,
  manage_brew_cask_links develop
does the same as develop_brew_cask, etc. At that point, I'd like to
rename the script "manage_brew_cask_links" and have the two present
names be symlinked to that.

This was motivated by (besides DRY) getting tired of having to
manually check symlinks to see which state I was currently in.
Merge pull request #6187 from treyharris/refactor-develop_brew_cask

Refactor {develop,production}_brew_cask