SConstruct: Add automatic configure capabilities

This is fairly simple for now: it checks if headers and libraries exist
and disables the external if so.  There is a hook for fancy externals
like python, mpi, blas, and qt.