Upstart autodetect ruby managers

- HOME is now picked up automatically from setuid.
- script will try rbenv, rvm, then chruby automatically.
- quoted heredoc to prevent /bin/sh interpreting variables early
- setuid/setgid by default so $HOME can be set reliably