Add pkg_try_installed()

Like pkg_is_installed(), but "returns" the package if any is found.

The need comes from pkg_is_installed() not able to "return" in any way
the package found. pkg_try_installed() extends pkg_is_installed()
making possible to test and query to package in one function call.
pkg_is_installed() is a now simple wrapper around pkg_try_installed().
Fix panic triggered when pkg add'ing a package already installed.

The `pkg_inst' pointer in pkg_add() was initialized to NULL on
declaration and never changed, triggering an assert in pkg_get2().
Add pkg_try_installed()

Like pkg_is_installed(), but "returns" the package if any is found.

The need comes from pkg_is_installed() not able to "return" in any way
the package found. pkg_try_installed() extends pkg_is_installed()
making possible to test and query to package in one function call.
pkg_is_installed() is a now simple wrapper around pkg_try_installed().
Fix panic triggered when pkg add'ing a package already installed.

The `pkg_inst' pointer in pkg_add() was initialized to NULL on
declaration and never changed, triggering an assert in pkg_get2().
Merge branch 'master' of github.com:kAworu/pkgng
Merge pull request #462 from kAworu/master

Fix a panic when pkg add'ing a package already installed.
Ignore vim swap files
Ignore test binary
Remove trailing space
Make pkg repo version a soft error for now as it is impeding development
Add missing read access check
Rename -L to -U and deprecate -L usage
The -L flag is being renamed elsewhere
search/rquery: Automatically update repo catalogue

The -U flag and REPO_AUTOUPDATE are available to disable this.

Issue:	#424
rquery/search: Be quiet when updating as the output is being used in scripts

The alternative is to send the output to stderr but I think that would be harder
to maintain and be error prone. If something is added and we forget to stderr it
in this call chain then scripts may end up parsing it

Issue:	#424
Update document date to the present