Support for using Rubber from a local Windows machine

(Remote machines must still be Linux)

- Add local OS detection (Windows, Posix) to BoundEnv class. (To add support for more platforms, see: http://rbjl.net/35-how-to-properly-check-for-your-ruby-interpreter-version-and-os)

- Add ability to write local hosts file in Windows format . Requires to run cmd prompt as admin.

- Writing to etc/hosts and known_hosts files now throw an error if user does not have write access.

- Add 'local_windows' Vulcanizer, including:
     * fixes a known limitation in Bundler when copying/deploying code cross-platform.
     * adds remote library dos2unix
     * add 'use_dos2unix' variable

- If 'use_dos2unix' is set, remote calls 'dos2unix' after code and/or config transfer.
Add Putty support when using Rubber from local windows. Incredibly useful.
Install Passenger/Nginx from packages instead of building by hand.

Upgrading an existing server should be straightforward. Just bootstrap and deploy. Existing Nginx config files will be maintained. You can optionally delete the passenger gem "gem uninstall passenger" afterwards.
Convert tabs to spaces in nginx.conf.

Tabs/spaces were used inconsistently. Spaces seems to be the standard in other config files.
Remove unneeded deploy.task blocks from deploy-passenger_nginx.rb

I believe these were copied from deploy-passenger.rb. I can't see any purpose for them in deploy-passenger_nginx.rb. I've tested creating a server, deploying, restarting Nginx, etc. and everything works without them.
Use update-alternatives to specify which version of Ruby to use.

This configures /usr/bin/ruby to run the version of Ruby installed by ruby-build.

This fixes a problem running passenger-status and passenger-memory-stats. Those commands appear to be hard-coded to use /usr/bin/ruby instead of using the Ruby in the path.
Update passenger_nginx:setup_apt_sources to use sudo_script
Preserve the system path in the Passenger/Nginx processes.

The version of Nginx installed from the Passenger packages no longer preserves system path. System path is needed in some cases. For example ImageMagick uses the system path to find delegates (like Ghostscript).
Remove duplicate nginx_log_dir.
Remove munin passenger plugins.

The format of passenger-status and passenger-memory stats changed with Passenger 4.x. These plugins no longer work. I've never found these plugins to be that helpful because:

- We lock down the number of worker processes so it never changes. No sense in graphing it.
- The biggest memory load in the system by far is the passenger workers. It's just as easy to monitor system memory as a whole vs monitoring the passenger memory. What would be really useful is monitoring memory by worker, which this plugin doesn't do.
Add rails 4 compatibility
Local windows support:
- Add dos2unix task for config
- Run dos2unix on code only if it was deployed via remote copy
- Introduce FIX_LINE_ENDINGS env var to force dos2unix to run
- Refactor rubber:config task to have sub tasks :push and :configure, so we can hook dos2unix between the two steps.
- Remove use_dos2unix variable (which was introduced in early attempts at Windows support)
Fix syntax error in template
Fix for backwards compatibility
Check for actual file, not just directory
Unicorn improvements
- Fix Unicorn init script
- Standardize Rake names with init script names (use terms "upgrade" and "kill")
- Increase Unicorn upgrade timeout to 10 mins
- Clarify log messages
- Allow setting PID file and number of workers from Rubber config
Improvements to Delayed Job template
1. Add :kill and :status tasks
2. Run DJ in bundle exec context (applies to both deploy-delayed_job.rb and monit-delayed_job.conf)
3. Move monit-delayed_job.conf inside the monit vulcanizer, as is the standard for all other templates
4. Remove app_user from executing delayed job and run as root instead to avoid permisison errors. It seems most processes triggered by Rubber run as root; even in cases where spawned workers have a different user, the original daemonizer process was run as root.
5. Add delayed job PID file control
6. Monit should have a 10-minute timeout (currently no timeout) because the PID file being monitored is not generated until after DJ daemonizes. (In this respect, DJ is different than most processes.) I chose 10 mins because my bulky app takes about 6 mins to daemonize. Once DJ daemonizes the timeout is cut short and Monit finishes.
Fixed compatibility with Vagrant 1.5.x.
Preparing the 2.8.1 release.
Try to use an MRI 2.1.x release that will work on Travis.