Extract all the linking logic to `link_file`
Check if target exists and is a symlink
Skip symlink if the existing symlink links to the same destination
--no-ri --no-rdoc is deprecated, use --no-document

/ruby/gemrc.symlink :
this congifuration was using 'gem: --no-ri --no-rdoc' to avoid
installation of docs with gems, but this method is now deprecated
changed it to new official way => 'gem: --no-document'