Reworked the configuration parser

The parser dispatch table was... kind of old and not very good.  We've
got something a lot cleaner now, and got rid of a bunch of cruft in the
dispatch function.

Some additional rework on the modules makefile, to get the libraries
building and linking correctly.  Also some space fixes in db.cc.