Make mac script run idempotently

Use preferred POSIX `command -v` test for command existence instead of
previous `which` technique. `which` exits with status `1` if nothing is
found. That would cause the script to abort because we use `set -e`.

http://stackoverflow.com/questions/592620/how-to-check-if-a-program-exists-from-a-bash-script

Remove GCC dependency in mac script

GCC is no longer necessary to compile Ruby. It was fixed in Ruby about
two years ago. LLVM has been supported since 1.9.3-p125.

https://bugs.ruby-lang.org/issues/5076
http://stackoverflow.com/questions/8032824/cant-install-ruby-under-lion-with-rvm-gcc-issues
Fix ruby-build errors with ruby 2.1.1

Apply mislav's patch
https://github.com/sstephenson/ruby-build/issues/526#issuecomment-37933242
against a readline bug in newer rubies. Should fix #219 and #218, and
we'll remove when a new ruby is released or if ruby-build patches this
bug itself.
Remove support for EOL'd ubuntus: 12.10 and 13.04
Ubuntu 14.04 LTS (Trusty Tahr) support
Update github raw urls

https://developer.github.com/changes/2014-04-25-user-content-security/
Automatically create laptopped vagrant boxes.

Vagrant boxes can be created automatically after a successful run of the
laptop test suite. These vagrant boxes are published to
[vagrantcloud](http://vagrantcloud.com/thoughtbot/) and should be a
solid start on a vagrant dev box suitable for modern ruby and
ruby-on-rails development.

Improvements include:

* Vagrantfiles fixed to have predictable names
* test/runner.sh now knows how to render vagrant boxes after tests are
  successful
* Error reporting improvements
* Full documentation on creating new base boxes

We now require vagrant >= 1.5.0 to use the automated test suite built
into laptop.
Remove the deprecated curl-ca-bundle

See: https://github.com/Homebrew/homebrew/commit/ab926db, thanks to
@wouterw
Install silversearcher from apt when possible
Support rerunning the installation script by restarting postgresql.

If postgresql was installed and started in a previous run, start causes:
Error: Service `postgresql` already started, use `brew services restart postgresql`

When developing changes to these scripts, it's important to be able to run and rerun this script without removing applications.
Refactor automated laptop tests to use rspec

Includes:

* A minimal gem, rake, and rspec environment
* The Distro class wraps up commands to test and provision vagrant boxes
* Publishing boxes to s3 has been simplified and improved
* Significant documentation updates

New laptop specs should now be significantly easier to write and understand.
brew-cask formula updated in README
Install nvm and node on Mac laptops

Includes:

* Installing nvm via homebrew
* Adding node init stubs to .zshrc
* Installs node 0.10.28 and uses it by default
Clarify the simpler "vagrant init" way to spin up a prerendered box
Remove spaces in node_version variable definition.
Making brew installs commands work in idempotently
Extend and improve osx idempotency

Includes:

* Fix the "brew_install_or_upgrade" function, use it for all components
* Remove executable perms
* Skip installing an already installed ruby

Technically re-running laptop is not idempotent in that it will upgrade
brew-installed items and potentially install a new ruby. I feel this
is expected and wanted.
Remove ruby 2.1.1 conditional behavior for rbenv installation
Be more careful about nvm init in zshrc
Fix nvm package install
Fix rbenv initialization for zsh

Clean install on OSX Mavericks 10.9.4, I encountered an error similar to this:

https://github.com/sstephenson/rbenv/issues/487

Implemented same zsh fix, seemed to work alright. I think this is what needs to
be changed in the code.