check every link when detecting virutalenv

- can't use just sys.executable, because the env python can be a link target
- can't use realpath, because the env python can be a link to outside the env
Merge pull request #4737 from minrk/venv-symlinks

check every link when detecting virutalenv