split __rvm_select into subfunctions, update #2393