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.

It would be nice if @zehome could verify that this solves the problem
that prompted PR #4912.