Use the configured rvm_ruby_repo_branch when fetching Ruby source

This will ensure that specification of a custom branch (e.g. `rvm install
--branch testbranch jruby-head`) will checkout and build the appropriate branch
from source

Fixes #3195
merge #3201: Use the configured rvm_ruby_repo_branch when fetching Ruby source
move using rvm_ruby_repo_branch higher up to restore the head to master transformation
Merge branch 'issues/3195-custom-branch'