Patch Set 1: Do not submit; No score

This is massively complex, and its just trying to poorly implement the simple concept we already have in Git which is atomic file replacement.

All we really need is an API that lets us open a temporary output stream, write to that stream, ensure that stream is closed and safely stored, and then say "OK, atomically make this Entry match the stream we just wrote, if you fail, let us know".

To be honest, after reading most of this code, I fail to see how we can easily get that behavior.