make pkg query returns EX_UNAVAILABLE when no package could be found.

pkg query exists 0 regardless if any package could be found. This patch
ensure to return a non-zero status (EX_UNAVAILABLE) when no package
could be found.
Merge branch 'master' of https://github.com/pkgng/pkgng
Add configuration support for setting the fetch timeout

This adds the configuration variable "FETCH_TIMEOUT", which
sets the timeout used by the fetch library to something the
user wants, retaining the old value of 30 as a default.
Clean up some error messages.

pkg_config_string() and pkg_config_bool() both emitted error
messages about pkg_config_int64. Fix this so they refer to
the correct functions.
Merge remote-tracking branch 'upstream/master'
check for the pattern length after parsing the full argument in pkg info.

Checking the pattern length before parsing it resulted in passing an
empty string to the pkgdb_query() function in some corner cases,
triggering an assert.
Removed an noop codepath.

the `pkgversion' is already initialized to NULL when declared, the
useless else branch was confusing.
Improve consistancy of the "Pattern must not be empty" message.

The same message was used in both search and info but with different
punctuation. While the search message version was more enthusiastic it
seems very unfair for good ol' info.
Put FETCH_TIMEOUT at the end.

Perhaps I should have put them at the end, because of when they
were added rather than trying to be clever and grouping them
with similar items.
Merge pull request #458 from kAworu/master

Various fixes and improvements
Merge pull request #461 from dannomac/clean-error

Clean up some error messages.
Merge pull request #460 from dannomac/master

Add fetch timeout, same as on release-1.0 branch.
Fix attempt to parse trailing junk on a line as a valid option, by
checking for characters we know will be in any valid options string.

Fix attempt to free() a pointer not allocated by malloc()

This runs OK now, but generates a lot of 'duplicate option' messages,
which are pretty pointless as the way the metadata is generated and
parsed means that every option is going to be duplicated.