Build dependency tree beforehand
We should resolve dependencies before we start building modules. This will allow for early detection of incompatible versions and circular dependencies, whereas now this is detected during build time. So what sometimes happens is we build a whole bunch of dependencies only to find out that we can't finish the build because one of them has an incompatible version.
In the future it may also allow for some interesting optimisations, like building dependencies in parallel.
Adding to this point, we will need to also verify all the requirements are compatible and working within a single build cycle. This will allow us to build bags that we know work together.
We will need to resolve #71 first.