WIP: Import recent changes from rbenv

This should be well tested, especially around multiple-version feature of pyenv.

This changes must break [pyenv-pip-rehash](https://github.com/yyuu/pyenv-pip-rehash). Need some more extra work to fix it. (It'd be better to bundle auto-rehash feature into pyenv as same as rbenv)