Improve dependency resolution

We now build an N-ary tree of the dependencies of the package which is
marked for installation.
This allows creating sane runtimes, as well as knowing in advance if we
actually can install a package.
This code might still have bugs, it has not yet been tested for complex
cases.
Allow dependencies in child packages to be satisfied by parent-packages

This change allows one to satisfy the dependencies of a child (a
dependency of your package) by embedding a package in the parent package
(your package).
This avoids lots of data duplication, and creates much nicer packaging.
(Think of a framework with submodules, e.g. Qt5)
This dependency-detection is limited to the parent package on purpose.
This is already complex enough, and I want to avoid unpredicatble
behaviour if random packages get selected to satisfy a dependency.