Factor loader into a database storer and a batch loader

Manifest files will be about 100 bytes per file we're loading. If we generated one every minute for a month and loaded them all at once, it would still be about 4 MB, which is why I wrote this section this way.