(#16752) Add support for pkg.conf on openbsd

Previously only local file sources were supported for openbsd
packages. Pkg.conf is a mechanism that openbsd uses to download
packages from HTTP sources as well. This patch adds checking for
the presence of 'installpath' lines in pkg.conf and, if one
are found and if the last character of an installpath line is a
::File::SEPARATOR (aka `/` character on openbsd) then it will
become the value of the environment variable PKG_PATH previous to
pkgadd invocation, which tells pkgadd to use the URL.
(#16752) Add tests for reading installpath from /etc/pkg.conf

This commit adds tests for reading installpath from /etc/pkg.conf in the
case that a 'source' has not be specified for the package.
(#16752) Better installpath validation

Previously, if pkg.conf contained an invalid installpath, then the
openbsd package provider would accept it and set it as the package
source. For example, `installpath`, `installpath=`,
`installpath=/path`.

This commit adds better input validation, so that we only set the
package source if the regexp matches, otherwise we raise.
(#16752) Added additional tests and allow key=value

This commit adds tests to improve regexp detection. It also modifies the
regexp to accept `installpath=path`, as openbsd does not require spaces
around the equals sign.
(#16752) Refactor spec test

Previously, the spec test replicated logic for how pkgadd is invoked,
and did so inconsistently  -- whenever the resource's source ends in a
slash, the get_version method gets called which invokes `pkginfo -I
bash`, and the corresponding expectation was only sometimes set.

This commit moves to two types of install expectations to helper
methods, converts the test to use `let` blocks, and sets the parameters
on the resource directly, instead of needing to define a `package`
method. It also adds a test to ensure the source parameter is updated.
Merge pull request #1379 from joshcooper/ticket/master/16752-openbsd-pkgconf

(#16752) support pkg.conf on openbsd