C code to capture libraries from a container
This is basically the parts of tests/manual/gl.pl that gather up libraries and dependencies, but faster and more thorough (recursively walking dependencies). Also a bunch of library improvements which I'll land first.