Massive scons refactoring.

Several major changes to the scons build system. 1. No more ugly LIBPATH lines in the SConscripts. 2. Better options to the ld linker allows scons to properly recognize higher-order dependencies. Now each SConscript only has the first-order dependencies for that particular job, and no others. This eliminates about 75% of the dependencies in the whole project. 3. The --as-needed option to ld only links an executable to the symbols it needs, even if more are given on the command line.