Handle subshells and one-line commands for auto-switching

Should resolve:

* postmodern/chruby#241 — subshells don't auto-switch for `.ruby-version`
* postmodern/chruby#245 — `cd foo && cmd` doesn't switch to `.ruby-version` before `cmd` runs (also fixes subshells for zsh)