changed tests to compile with new dep resolution #983

also added a couple of optimizations:
 - when extracting an archive, just extract everything in one pass if possible
 - use naming to reduce the number of merged libraries on disk (otherwise this would get pretty extreme)
Merge branch 'merge-libs' into merge-libs-master