Extract Current Ruby version/platform detection from dependency.rb

That can be reused across several places in bundler and hence
extracted that code which is responsible for properly
detecting current ruby version.