A big database-related code dump

I figured that as part of my quest to make the new MHng work properly
I'd start with database operations.  The general idea here is that I
can leave mh-gmail-watch in place while rewriting all the other tools
to work more sanely, and then when I'm done with that I can attempt to
tackle IMAP... :)

This contains a bunch of code that starts to connect to a SQLite
database in your local filesystem.  Note that it's not enough to make
`scan` work yet, but at least it's something!