base/require deps added
This is more an idea than anything for how we can make base/require fit more standardly into the build thing without having toooooo many exceptions.
There is also some extra code in the dependency tree generator to prune out anything with missing dependencies; most of the changes to _get_sorted_order.visit
can be ignored.
This MR can be closed after glancing at it, it just seemed the easiest way to show an idea I had.