When launching bundler subprocesses for end to end testing, all of them
will load the `spec/support/rubygems_version_manager.rb` file passed as
a ruby's `-r` flag.
Unfortunately this file depends on `pathname`, so unless we drop that
dependency, we can't really test support for including the `pathname`
gem in the `Gemfile`.
This commit implements some refactorings to avoid loading `pathname`
inside `bundler` test subprocesses.
c1f948788c