Improve brew doctor autocrlf message.

Better version of ed357d.

References #15711.
References #17361.
References #17437.
Add SourceForge bottle mirror selection.

Use ENV['HOMEBREW_SOURCEFORGE_MIRROR'].

Closes #15642.
Closes #17368.
Add bash and zsh completion directory functions.
Add ruby/rake functions to use system framework version.
jpeg: support version format.
ack: cleanup and add test.
autoconf: use inreplace instead of patch.
cmake: general cleanup and improve test.
colordiff: add test.
freetype: improve test.
geoip: add test.
gist: add test and use new rake function.
hub: add test and use new rake function.
libtool: general cleanup and improve test.
mysql: fix typo, developer warning and add test.
imagemagick: cleanup with new auto-options.

Most options can autocreated now.
This means have been are renamed (`brew options imagemagick`).
ios-sim: use new rake function.
plustache: use new rake function.
rubinius: use new ruby function.

Closes #17425
Make local bottle installation more robust.

Use versions to better get hold of the filename.