Add a new pkgdb_close_rw hook
Allow pkg_register_cmd_argv0 to be executed according to argv[0]

Known issues (this only works with 2 arguments and still get the pkg(8)
first arguments)

While here allow pkg_register_cmd to register multiple commands.
Remove debug and properly execute the plugin