Pathname#extname returns a string
keg: use lib helper
keg: try to avoid disk IO when possible

Calling Pathname#text_executable? reads in the first 1024 bytes of the
file, so try the basename check (which requires no filesystem access)
first.
keg: factor out dylib id calculation
keg: decouple dylib id changes from install name changes

The dylib id calculation does not use any information gathered in
install_names_for, so we can pull the logic out completely and only
yield the install names.
keg: yield install names successively instead of all at once

Every caller of install_names_for loops over the yielded array. Now that
we have separated the dylib id calculation and update, we can eliminate
the need for a separate loop and yield each install name individually.

Rename this method to "each_install_name_for" for clarity.
keg: eliminate reject_proc, make callers determine which names to fix
keg: combine loops in relocate_install_names
keg: add debug output to install name machinery
Move Pathname#dynamically_linked_libraries to mach module
Unify install name parsing
Extract HOMEBREW_TEMP constant
keg: use start_with? instead of regexp match