Merge tests and remove_from_path from rbenv

This adds the missing parts from the upstream rbenv merge:
https://github.com/sstephenson/rbenv/commit/f4652fbbf0bbc3d07a36e8781b2be54ec1f75518

- https://github.com/sstephenson/rbenv/commit/e4cbf04592cfcd9d244fb83284e14524c8ba0377
- https://github.com/sstephenson/rbenv/commit/3ee395f9b576e4111650cef67328f4ffe3687b5a