changed how we link binaries #983

Instead of linking directly with a number of static libraries, we
now traverse the depgraph and merge all libraries we find into a
single large one, and then link with that using -whole-archive.

This ensures that we don't miss any object files that might contain
commands or parameters or whatnot.

This commit only does mongo, mongod, mongos, and tools.  Tests remain
but I am fried for tonight.
fixed build on OSX with mysterious CMake option #983
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)
moved client until later to fix linking problems #983
fixed build on cmake <2.8.12 #983
moved mongoclient definition up to fix client/examples #983
made sure cleaning the dbpath works well on osx #983
Merge pull request #992 from Tokutek/merge-libs

link all objects for mongo binaries

fixes #983
Merge branch 'bugfixes/tokumx-1.4'