Repo names vs. identifiers

Multiple repositories are listed by an identifying tag in pkg.conf(5)
However to prevent either deliberate or accidental collision with
reserved terms like 'main', 'temp', 'local' we generate a name for the
repo by prepending 'repo-' to that identifier.  So the filename the
repo DB is stored in for the repo identified as 'foo' is
/var/db/pkg/repo-foo.sqlite and the database is attached as 'repo-foo'
within sqlite.

Add accessor function:

pkg_repo_ident()

and search functions:

pkg_repo_find_name()
pkg_repo_find_ident()

and remove

pkg_repo_find()

Always use accessor functions when dealing with repo names or idents,
rather than dereferencing a struct pkg_repo directly.

Fixes #496

Various other small fixes noticed in passing.