Keep information about all block files in memory

As preparation for a version of #4701 that keeps track of the size of data on disk.
Done.