packagefs: Move Volume::PackagesDirectory to top level

Also make it a BReferenceable and fix Volume::fPackagesDirectory leak.
packagefs: Package: Use PackagesDirectory directly

... instead of Volume. Necessary to support using packages from
different directories.
packagefs: Add support for node_ref
packagefs: PackagesDirectory: Use node_ref
boot loader: Implement subset of <dirent.h> API

* Add opendir(), closedir(), readdir(), rewinddir().
* Add open_directory(), similar to opendir(), but basing the path off a
  specified directory.
Boot loader: Add get_stat(), directory_from()

* Add Node::Stat() and simplify Descriptor::Stat().
* Add get_stat() and directory_from().
Boot loader: Update copyright right in boot menu
Boot loader: Add support for choosing an old packages state

For potential boot volumes with older packages states the respective
item in the boot volume menu now has a sub menu for selecting a state.
The boot loader functionality for this feature is complete -- i.e. the
respective kernel is loaded and the name of the old state is added to
the kernel args -- but kernel packagefs and package daemon support is
still missing.
VFS: Don't try to mount the no longer existing /boot/common packagefs
VFS: Pass packages state selected in boot loader to packagefs
packagefs: Initial support for booting into old states

If an old state is specified via mount parameters we load the packages
as specified in its activated-packages file.

The interface for the package daemon, the package daemon itself, and
the package kit are still to be adjusted, so ATM some PM components
might be a bit confused when an old state was booted.
Adjust packagefs ioctl interface to support old states

* PackageFSVolumeInfo: Add the directories for all relevant states.
* PackageFSPackageInfo: Include the package file's parent directory node
  ref.

Package daemon and package kit still don't support old states yet.
kernel: make sure thread priority is within valid range

The scheduler expects that all threads expect the initial idle threads
have priority in range [THREAD_MIN_SET_PRIORITY, THREAD_MAX_SET_PRIORITY].
If the requested pririty is out of range the value is clamped. Failing
with B_BAD_VALUE is probably an overkill since there isn't any real
change in the guarantees provided by the scheduler about the behavior
of such thread. Also, BeBook suggests that spawn_thread() can specify
priority 0.