Cleanup FileStorage

A set of cleanup changes, mainly to convince myself that it is thread safe and sufficiently robust...
Oh, I know why *these* ```assert()```s were not changed: this is the ```cleanup`file_storage``` branch/pull request, and I just did the minimum outside of ```file_storage.{h,cc}```. The next branch is ```cleanup/file_db```, and addresses these.