macvim: Fix compilation on Mac OS X 10.9

On Mavericks we need to explicitly include AvailabilityMacros.h to have
the version detection macros defined.

Fix 10.9 ruby framework detection and compilation

Mavericks ships with version 1.8 and 2.0 of the Ruby.framework, so we
must directly link the framework version matching the ruby-command.

This also means that ruby.h must no longer included via the framework
name, which has the nice side effect of allowing you to compile with
non-framework rubies, if you remove the formula's hardcoded RUBY_PATH.
(re API) Modifying linkapps to use /Applications by default, and support --local
(new doc) Adding documentation for `brew linkapps`
(- fix) Removing documentation of app-moving, as per #22379
(- fix revert) Re-add existence-check for ~/Applications

This reverts commit d42410c97d91487ba2230952f3731c3ee48446a5.
(re BROKEN) Trying to move `linkapps` out of contrib

(as per discussion on #22378.)
Revert "(re BROKEN) Trying to move `linkapps` out of contrib"

This reverts commit d366942c660f0fad7e478f6c80516595a6ac3c39.