openbsd_pkg: rework package name parsing.

Give the module more knowledge of the package name structure.
This makes the handling of version-less flavors (like vim--no_x11)
behave properly.

While here sprinkle debug logging that is helpful when testing the
module.
Merge pull request #4949 from eest/openbsd_pkg-rework-name-parsing

openbsd_pkg: rework package name parsing.