Isolate blob file storage

Moves all code related to database blob storage behind interfaces so it will be easy to migrate to an implementation that uses the file system.