keg: don't skip linking based on relative pathname

ed1a674c ("keg: allow selective linking at the file level") had a
regression which caused the link step to skip files with the same name
as a directory in the user's CWD.

Keg#link_dir yields a relative pathname, so assumptions cannot be made
about the nature of that pathname in the block.

Instead, introduce ":skip_dir" and ":skip_file" to replace the existing
":skip" directive. This way, we won't skip things marked ":skip_dir"
when linking a file, and vice-versa.

Fixes #10860.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Update external deps tests

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Allow multiple digits in GitHub version parts
brew doctor: check for DYLD_INSERT_LIBRARIES

Conflicts:

	Library/Homebrew/cmd/doctor.rb
Quote the .xz path in case of spaces

Conflicts:

	Library/Homebrew/download_strategy.rb
Remove redundant versions and update version tests

Signed-off-by: Jack Nagel <jacknagel@gmail.com>

Conflicts:

	Library/Formula/antlr.rb
	Library/Formula/assimp.rb
	Library/Formula/cmucl.rb
	Library/Formula/fann.rb
	Library/Formula/grads.rb
	Library/Formula/haxe.rb
	Library/Formula/imap-uw.rb
	Library/Formula/jsl.rb
	Library/Formula/libspotify.rb
	Library/Formula/mafft.rb
	Library/Formula/ncrack.rb
	Library/Formula/openssl.rb
	Library/Formula/phpmyadmin.rb
	Library/Formula/poco.rb
	Library/Formula/privoxy.rb
	Library/Formula/pypy.rb
	Library/Formula/savana.rb
	Library/Formula/scala.rb
	Library/Formula/sedna.rb
	Library/Formula/sphinx.rb
	Library/Formula/synergy.rb
	Library/Formula/wwwoffle.rb
	Library/Formula/x3270.rb
Remove libiconv duplicate

Commit ee2c3ab ("Remove spurious libiconv dependencies") pruned all
existing "depends_on 'libiconv'" usages from Homebrew in preparation for
removing the libiconv dupe itself.

Now that is done, and we can remove and blacklist it. It can be obtained
from Homebrew-alt.

Closes #10464.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>

Conflicts:

	Library/Homebrew/cmd/doctor.rb
`brew test` now gets a compilation environment
Abort installs if reps are installed but not linked

Except for keg-only reps of course.

I suspect quite a few bug reports we receive are due to this sort of thing.

Ideally we'd not do this check for deps, since they have already been checked. I fear some weird consequences. But this check *should* be done before unlinking the previously installed brew in the case of upgrades. And the ignore_deps flag is set after the initialiser. There are ways round this but the code would be less nice.
ohai'ing this is ugly IMO

I wanted to make it possible to not do the additional newline (in brew) if this code path is hit. But I didn't see a way to do it without overriding the Interrupt exception and throwing a new one.

“Never add more code than necessary for aesthetics in error handling.” — mxcl
Conflicts:

	Library/Homebrew/formula.rb
Remove invalid character for UTF-8

Closes #10962.

Signed-off-by: Max Howell <max@methylblue.com>

Conflicts:

	Library/Homebrew/cmd/doctor.rb
Warn about broken symlinks in HOMEBREW_PREFIX

Refs #10874.

Conflicts:

	Library/Homebrew/cmd/doctor.rb
Tell user to `brew update' if no .git
Conflicts:

	Library/Homebrew/cmd/versions.rb
Let's print the full path
Conflicts:

	Library/Homebrew/download_strategy.rb
Improve CLI tools suggestion doctor text

Conflicts:

	Library/Homebrew/cmd/doctor.rb