import BSD license str2argv from: https://github.com/ryanflannery/str2argv
Introduce pkg alias

To use it add the following to pkg.conf:
alias:
  leaf = query -e "%a == 0" "%n-%v"

now pkg leaf will do the equivalent of:
pkg query -e "%a == 0" "%n-%v"

Fixes: #324
Implement automatically reexcuting the initial command if a new pkg version has been detected and this upgrade has been performed
Remove old options from sample
Add alias sample in the pkg.conf.sample
Fix crash analyzing linux shlibs

One such port was games/linux-candycruncher-demo
Prevent sql_on_all_attached_db() from indicating success and
simultaneously returning bogus SQL in the case where there are no
attached DBs beyond main or temp -- this does occur in the regression
tests and might occur on an unconfigured system.
require pkgdb_open_multirepos() to have successfully opened at least
one repo database before it can return EPKG_OK.
Add a '-R' option to specify the directory to search for
per-repository configuration files.  This overrides the REPOS_DIR
value set in pkg.conf(5).
Fix tests:

 - AUTODEPS default value is 'yes' nowadays

 - Don't read repository configs from REPO_DIR: testing shouldn't
   know anything about the local pkg config on my build box...
Don't load configs from REPO_DIR while testing.