rustc: Don't error on the rlib symlinks

This commit implements a layman's version of realpath() for metadata::loader to
use in order to not error on symlinks pointing to the same file.

Closes #12459
auto merge of #12474 : alexcrichton/rust/issue-12459, r=brson

This commit implements a layman's version of realpath() for metadata::loader to
use in order to not error on symlinks pointing to the same file.

Closes #12459