packagefs: Refactor UnpackingAttributeDirectoryCookie

Pull out a reusable base class AutoPackageAttributeDirectoryCookie.
packagefs: Automatic package attributes for packages symlinks

Add automatically generated attributes "SYS:PACKAGE" and
"SYS:PACKAGE_FILE" to the /packages/... directories and symlinks.
find_path*(): Improve B_FIND_PATH_IMAGE_PATH handling

* get_file_attribute(): Use O_NOTRAVERSE, so we correctly read the
  attribute from symlinks.
* internal_path_for_path(): Shuffle things around a bit: The dependency
  is resolved before handling B_FIND_PATH_PACKAGE_PATH, now. This adds
  support for getting the package file for a dependency. The dependency
  was ignored in this case before.
* Use kSystemPackageLinksDirectory instead of hard-coding "/packages".
package kit: Add API for parsing resolvable expression strings

* Add BPackageInfo::ParseResolvableExpressionString().
* Add BPackageResolvableExpression constructor and SetTo() taking an
  expression string.
BPackageManager: Add mandatory constructor parameters

Require the installation interface and the user interaction handle to
be passed to the constructor. Formerly, derived classes set them
manually in their constructors. This makes using the class without
having to subclass it possible.
BPackageManager::UserInteractionHandler: Make non-abstract

Most of the hooks don't strictly need a non-empty implementation. The
defaults now simply throw exceptions in those that do. This allows the
class to be instantiated, which is useful when a BPackageManager is only
used for finding packages.
BPathFinder: Add BPackageResolvableExpression initialization

Add a constructor and a SetTo() method with a
BPackageResolvableExpression parameter instead of a path. The path of
the package satisfying the expression is used.

The new functionality lives in libpackage as it uses the package kit.
findpaths: Add '-r' option

It allows finding a path for a resolvable expression.
Update BPathFinder API docs

* Update FindPath() wrt. B_FIND_PATH_PACKAGE_PATH handling.
* Add documentation for BResolvableExpression version of constructor and
  SetTo().