Use canonicalized name in NoSuchKegError message

cf. #22778.
Modernize `brew diy`
diy: warn when detected name is an alias

cf. #22778.
daemon: fix mavericks strlcpy/strcat

Patch from macports (thanks to mbogosian): https://trac.macports.org/ticket/42845

Closes #25455.
Closes #27585.
Refactor ARGV.kegs
Add an extra sanity check
Prefer opt prefix over linked keg entry when picking active keg