[FIXES #2096] fix relative symlinks of symlinks (#2454)
[FIXES #2096] fix relative symlinks of symlinks (#2454)

This makes yarn link work when $HOME/.config/yarn/link/ is itself a symlink.

----

The following commit forces symlinks to be relative:
https://github.com/yarnpkg/yarn/commit/36d73cc3bb0e3c4afcea4f25b06cc76b7b5531fa

This isn't ideal, although it enables some portability it breaks others.
For example, it is not uncommon for `$HOME/.config` itself to be be a
symlink: `$HOME/.config` -> `$HOME/src/stefanpenner/dotfiles`.

Now when running `yarn link` inside `$HOME/src/ember-cli/ember-cli` we
end up with:

```js
path.relative('/Users/spenner/.config/yarn/link/ember-cli',
'/Users/spenner/src/ember-cli/ember-cli');
=> '../../../src/ember-cli/ember-cli'
```

Which results in the link located at:
`/Users/spenner/.config/yarn/link/ember-cli` pointing to
`/Users/spenner/.config/src/ember-cli/ember-cli` rather then
`/Users/spenner/src/ember-cli/ember-cli`

This is because `/Users/spenner/.config` is actually a symlink pointing
to `/Users/spenner/src/stefanpenner/dotfiles/.config/`

---

This PR provides mitigate the issue raised in #2096, but reifying the
paths via `realpathSync` before deriving the relative path. This doesn't
fix all issues, e.g. symlinks cannot be changed after this reification.
dguo/yarn,ConAntonakos/yarn,lawliet89/yarn,bsansouci/esy,dguo/yarn,bsansouci/esy,lawliet89/yarn,andreypopp/esy,seripap/emojiless-yarn,andreypopp/esy,bsansouci/esy,mgcrea/yarn,seripap/emojiless-yarn,andreypopp/esy,mgcrea/yarn,ConAntonakos/yarn